Re:Explaining the browser's event loop, tasks, and microtasks
by Cakez0r on Monday August 17, 2015 @02:20PM
(#10075021)
I'm quite surprised that the output of the examples is even supposed to be deterministic!
[ Parent
| on HN ]
Re:Explaining the browser's event loop, tasks, and microtasks
by jinushaun on Tuesday August 18, 2015 @10:30AM
(#10079352)
Only because both the timeout and promises are pre-resolved. They both immediately "complete" their tasks, so the callbacks are immediately queued. That means you're measuring event loop queuing order, and ignoring execution time.