title: If JavaScript is single-threaded, what is this?
body: <p>This is the <a href="http://jsfiddle.net/5H9XT/3/" rel="nofollow noreferrer">code</a> :</p>
  
  <pre><code>// link 1 handler. This must finish in any case before link2 starts
  $('#link1').click(function () {
      console.log("First Handler");
      setTimeout(function() {
          console.log("Thread???");
      }, 2000);   
  });
  
  // link 2 handler. It starts only when block code of link1's handler finish
  $('#link2').click(function () {
      console.log("Second Handler");    
  });    
  
  $('#link1').click();
  $('#link2').click();
  </code></pre>
  
  <p>clicking, in sequence, on link1 and link2, means (for what I <a href="https://stackoverflow.com/questions/9502956/concurrency-does-jquery-handler-preserve-queue/9503059#comment12033603_9503059">understand</a>) that block code of link2's handler can't start before link1's handler finish (because JS is single thread, and system events is synchronous).</p>
  
  <p>Well, so, why about <code>console.log("Thread???");</code> that will be printed after 2sec? I see it such as a thread. Also, the behaviour it's the same...</p>