title: JavaScript multithreading
body: <p>I'm working on comparison for several different methods of implementing (real or fake) multithreading in JavaScript. As far as I know only webworkers and Google Gears WorkerPool can give you real threads (ie. spread across multiple processors with real parallel execution). I've found the following methods:</p>
  
  <ul>
  <li><p>switch between tasks using <code>yield()</code></p></li>
  <li><p>use <code>setInterval()</code> (or other non-blocking function) with threads waiting one for another</p></li>
  <li><p>use Google Gears WorkerPool threads (with a plugin)</p></li>
  <li><p>use html5 web workers</p></li>
  </ul>
  
  <p>I read related questions and found several variations of the above methods, but most of those questions are old, so there might be a few new ideas.</p>
  
  <p>I'm wondering - how else can you achieve multithreading in JavaScript? Any other important methods?</p>
  
  <p><strong>UPDATE:</strong> As pointed out in comments what I really meant was concurrency. </p>
  
  <p><strong>UPDATE 2:</strong> I found information that Silverlight + JScript supports multithreading, but I'm unable to verify this.</p>
  
  <p><strong>UPDATE 3:</strong> Google deprecated Gears: <a href="http://code.google.com/apis/gears/api_workerpool.html">http://code.google.com/apis/gears/api_workerpool.html</a></p>