title: SetTimeout function still makes UI unresponsive until its operation over
body: <p>I have wrapped the long running logic(longLoop) with setTimeout function, but still UI become unresponsive until long running execcution over. It doesn't allow to click other UI button. Please look at my below example and let me know if any issue you see.</p>
  
  <pre><code>function longLoop () {
      var startLogTime, endLogTime;
      startLogTime = new Date().getTime();
      console.log("loop begin");
      for (var i = 0; i &lt;= 500000000; i++) {
          var j = 10;
      }
      endLogTime = new Date().getTime();
      console.log("loop execution takes " + (endLogTime - startLogTime) + " milliseconds");
  }
  
  $(document).ready(function () {
  
      $("#btnButton").bind("click", function () {
          setTimeout(longLoop, 15);
  
      });
  
      $("#anotherButton").bind("click", function () {
          console.log("another operation clicked");
      });
  });
  
  &lt;input type="button" id="btnButton" value="Start Long Operation" /&gt;
  &lt;input type ="button" id="anotherButton" value= "Another operation" /&gt;
  </code></pre>
  
  <p>Thanks</p>