Node.js setTimeout in forever loop : <p>Can't explain nodejs behavior. I have code:</p>

<pre><code>while (true) {
  setTimeout(() =&gt; console.log(1), 0)
}
</code></pre>

<p>And this script just hanging...</p>

<p>How come? I've been thinking <code>setTimeout</code> is non-blocking and asynchronous, and nodejs use <code>timers</code> event loop phase for scheduling <code>setTimeout</code> callbacks... but it seems like event loop blocked...</p>
