Closed ceifa closed 3 years ago
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
const o = Promise.resolve()
console.log(o === o.then(() => {}))
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
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