Skip to content

Async Promise Execution in quickjs runs in the same thread #948

Answered by bnoordhuis
harumazzz asked this question in Q&A
Discussion options

You must be logged in to vote

Speaking as someone who is substantially responsible for making Node.js what it is today: promises - and, by extension, Promise.all - work exactly the same in Node.js and QuickJS.

It sounds like you're conflating the general concept of promises with specific tasks (like file operations) that get offloaded to a native thread pool but that's no different from what you can do with QuickJS...

...and is in fact what our @saghul does with txiki.js. It's basically QuickJS + libuv, the event loop and I/O library backing Node.js.

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by harumazzz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants