Re:JavaScript Concurrency Model and Event Loop
by jlward4th on Sunday May 21, 2017 @11:52AM
(#14387799)
Misleading title. There was actually nothing about concurrency in the article.
[ Parent
| on HN ]
Re:JavaScript Concurrency Model and Event Loop
by thereIsCon on Sunday May 21, 2017 @02:31PM
(#14388460)
+1
If the article had used I/O (http request) as an example of event handling (message queuing), it would have added some concurrency context.
Re:JavaScript Concurrency Model and Event Loop
by Pherdnut on Tuesday May 23, 2017 @12:05AM
(#14398728)
setTimeout uses the same message queuing system as XHR, DOM events, or communicating with stuff that has its own stack like iframes or workers. That's why a function with a timeout of 0 will not fire until after it's enclosing function has popped. Functions block. Waiting for messages doesn't. That's the model for JS concurrency.
Re:JavaScript Concurrency Model and Event Loop
by abhikandoi2000 on Sunday May 21, 2017 @10:15PM
(#14390512)
I agree.