src: return early if nextTickQueue is empty
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. PR-URL: https://github.com/nodejs/node/pull/10274 Reviewed-By:Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Jeremiah Senkpiel <fishrock123@rocketmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com>
parent
9e4a899d
Please register or sign in to comment