30 ms·
I see, so the asynchronous model that JavaScript implements is an answer to the question: > Given a single thread, how can we do multiple things at once (slow
by endorphine 5y ago
I see, so the asynchronous model that JavaScript implements is an answer to the question:
> Given a single thread, how can we do multiple things at once (slow I/O, process user events like a mouse click etc.)
And the answer to this, is that we use continuations. Is that correct?
- patrickthebold 5y agoYep, and even in languages with multiple (OS) threads, a thread is still a resource with a stack that takes some memory, and so they might also do non-blocking IO with either with callbacks or promises or similar.