I've read that all browsers except chrome have javascript code running in a single thread. I'm not even sure if this is still true, but assuming it is: Will calling window.setInterval multiple times open multiple threads in chrome?
Asked
Active
Viewed 122 times
1 Answers
1
setTimeout
and setInterval
(spec link) will run code asynchronously, but won't run code on a different thread. It will use main UI thread to run the code you provide after specified period of time. To use multithreading, take a look at HTML5 Web Workers (MSDN) or look at this answer (stackoverflow).
-
its a bad idea to link w3school articles, check this link for details: http://www.w3fools.com/ – NoNameProvided May 04 '14 at 14:32
-
Fixing these to link to the developers version of the spec instead. – Domenic May 04 '14 at 16:24