Skip to content
This repository has been archived by the owner on Jan 7, 2023. It is now read-only.

Rewrite entire project #3

Open
wants to merge 8 commits into
base: master
Choose a base branch
from
Open

Rewrite entire project #3

wants to merge 8 commits into from

Conversation

Lustyn
Copy link
Member

@Lustyn Lustyn commented Oct 4, 2018

This PR just serves as an ongoing track of what needs to be and has been done about the coroutine-based rewrite.

TODO:

  • Coroutine/"Thread" based event loop (no upvalue abuse)
  • Better documentation
  • Documentation of thread system and considerations to make when using it
  • Parameter assertions
  • Unit tests
  • Howl CI (maybe?)
  • Promises
  • Await
  • Rewrite major sister libraries (r.lua, w.lua, k.lua)

Major Notes:

  • To prevent confusion and maintain compatibility, the default event "thread" implementation forks itself.
  • Added jua.onInterval and jua.onTimeout, they are the same as jua.setInterval and jua.setTimeout but their arguments are reversed to follow the same scheme as jua.on
  • Up-to-date versions of any Jua libraries by me are available in the jua2 branch of their respective repositories. Any testing should be done with those versions.

@Lemmmy

This comment has been minimized.

@Lustyn

This comment has been minimized.

Using coroutines *correctly* this time.
 - Added more tests to example.lua
 - Commented the code a bit more
 - Event threads now listen to kill signals from child threads
 - Implemented promises
 - Added promise examples
 - Commented examples
Adds jua.sleep that resolves or rejects after given timeout with varargs parameters
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants