Commit 8dc6be17 authored by Vladimir Kurchatkin's avatar Vladimir Kurchatkin Committed by Trevor Norris
Browse files

node: avoid automatic microtask runs



Since we are taking control of the microtask queue it makes sense to
disable autorun and only run microtasks when necessary. Just setting
isolate->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: default avatarTrevor Norris <trev.norris@gmail.com>
parent b705b73e
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment