-
-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement promises support #15
Conversation
I like the concept and awaiting all dangling promises makes sense. Doing something like this would allow Promise.all functionality. I've been thinking about how then and catch work in JS. When you call .catch or .then it actually returns a new promise eg
will print false. I guess though it would be possible every time then or catch is called to push the new promise to the registry too |
I think I did some great things here, the API is simple and the JS-Lua bindings is pretty easy to understand, I used a lot of your code as base but removed some too. Would be nice to have your considerations @timstableford |
This is definitely a much simpler approach than mine. The lack of continuation function really helps |
This PR is just a concept, the commented code should not be considered and will not be commented when it's done.
Related: #13