Open sanjarcode opened 2 years ago
Tutorials and books introduce JS as single threaded, but do so with such vigor that they fail to make a distinction between the language and it's running environment.
This fact is pretty obvious since asynchrony with a single processing agent is the same as being single threaded, except when doing round robin.
Akshay Saini - event loop and asynchronous nature of JS this video, indirectly, shows that async tasks are handled inside the JS environment, and then into the queue, and from there into the stack via the event loop.
Both Chrome and Node.js provide a potential* multihreaded environment which is controlled by JS (which is single threaded).