Achieve Multithreading in Java Script
On the web you may found the various ways to archive multi-threading but as far as I know, the only way is HTML5 Web Workers. You can simulate ‘concurrency’ by using techniques like
setInterval() and event handlers.
Yes, all of these features run asynchronously, but non-blocking doesn’t necessarily mean concurrency. Like
setInterval() only schedule things to happen later, they don’t run concurrently with anything else. Before multithreading when executing scripts in an HTML page, the page becomes unresponsive until the script is finished.