title: Are Mutexes needed in javascript?
body: <p>I have seen this link: <a href="http://www.developer.com/lang/jscript/article.php/3592016" rel="noreferrer">Implementing Mutual Exclusion in JavaScript</a>.
  On the other hand, I have read that there are no threads in javascript, but what exactly does that mean? </p>
  
  <p>When events occur, where in the code can they interrupt?</p>
  
  <p>And if there are no threads in JS, do I need to use mutexes in JS or not?</p>
  
  <p>Specifically, I am wondering about the effects of using functions called by <code>setTimeout()</code> and <code>XmlHttpRequest</code>'s <code>onreadystatechange</code> on globally accessible variables. </p>