Re:Dropbox is hiring a Web Engineer
by bitanarch on Friday July 02, 2010 @04:44PM
(#1482294)
That depends on how the setTimeout() actually schedules things in the JavaScript engine. Recall that JavaScript is (before Chrome and worker threads appeared) traditionally single threaded - normally, even when you say setTimeout(fn, 0) - it's just putting your fn()'s execution at the end of the run loop - or whatever the scheduler calls its list of things to do. So, even though your current execution slice in the run loop may take like 1 minute, your fn() will still not execute until you're done what you're currently doing.
[ Parent
| on HN ]
There are no comments on this comment yet.