title: Does Javascript's setInterval block for function return?
body: <p>I have a javascript function <code>function a()</code> that I want to be executed every 10 seconds.<br>
  I found that I can use the <code>setInterval</code> so that I can do something like: <code>setInverval(a, 10000);</code><br>
  My question is the following:<br>
  Does this mean that<br>
  i) every 10 seconds the specified function is called (regardless if the previous execution is running/multithreaded way) OR<br>
  ii) that the function is called and when this function <em>has finished execution</em> then the next call of the function is scheduled after 10 seconds?<br>
  I am basically interested in option 2. If option 1 is what is happening by default then how could I achieve option 2?</p>