src: return early if nextTickQueue is empty by trevnorris · Pull Request #10274 · nodejs/node
Checklist
-
make -j4 test(UNIX), orvcbuild test nosign(Windows) passes - tests and/or benchmarks are included
- commit message follows commit guidelines
Description of change
This brings the node::MakeCallback and node::AsyncWrap::MakeCallback
implementations into alignment in that they return early if the
nextTickQueue is empty after processing the MicrotaskQueue.
Include test to make sure early return happens. Test has text explaining
the conditions for the test to pass, since it relies on internal
mechanisms that aren't guaranteed in the future.
R=@bnoordhuis
R=@addaleax