<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/node.git/test/simple/test-microtask-queue-run-immediate.js, branch node-review</title>
<subtitle>github.com: joyent/node.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/'/>
<entry>
<title>node: avoid automatic microtask runs</title>
<updated>2014-10-01T21:42:05+00:00</updated>
<author>
<name>Vladimir Kurchatkin</name>
<email>vladimir.kurchatkin@gmail.com</email>
</author>
<published>2014-09-22T16:19:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/node.git/commit/?id=8dc6be1747d3a48af56f89e973ecb5665f89a2e1'/>
<id>8dc6be1747d3a48af56f89e973ecb5665f89a2e1</id>
<content type='text'>
Since we are taking control of the microtask queue it makes sense to
disable autorun and only run microtasks when necessary. Just setting
isolate-&gt;SetAutorunMicrotasks(false) would cause _tickCallback() not to
be called.

Automatically running the microtask queue will cause it to run:

* After callback invocation
* Inside _tickCallback()
* After _tickCallback() invocation

The third one is unnecessary as the microtask queue is guaranteed to be
empty at this point. The first only needs to be run manually when
_tickCallback() isn't going to be called by MakeCallback().

Reviewed-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we are taking control of the microtask queue it makes sense to
disable autorun and only run microtasks when necessary. Just setting
isolate-&gt;SetAutorunMicrotasks(false) would cause _tickCallback() not to
be called.

Automatically running the microtask queue will cause it to run:

* After callback invocation
* Inside _tickCallback()
* After _tickCallback() invocation

The third one is unnecessary as the microtask queue is guaranteed to be
empty at this point. The first only needs to be run manually when
_tickCallback() isn't going to be called by MakeCallback().

Reviewed-by: Trevor Norris &lt;trev.norris@gmail.com&gt;
</pre>
</div>
</content>
</entry>
</feed>
