You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The core-js polyfill implementation of queueMicroTask() always falls back on process.nextTick() in Node, which schedules execution ahead of promise resolve/reject microtasks. This is not the behavior that you get with Node's native queueMicroTask() function.
Using the core-js polyfill you get "second/first", but using the Node 11+ native function you get "first/second".
This could be resolved using Promise.resolve().then(...) instead of process.nextTick(...). I realize there would be a performance penalty, but the alternative is running code in an unpredictable order, which can outright break things.
The text was updated successfully, but these errors were encountered:
The core-js polyfill implementation of queueMicroTask() always falls back on process.nextTick() in Node, which schedules execution ahead of promise resolve/reject microtasks. This is not the behavior that you get with Node's native queueMicroTask() function.
Consider the following:
Using the core-js polyfill you get "second/first", but using the Node 11+ native function you get "first/second".
This could be resolved using
Promise.resolve().then(...)
instead ofprocess.nextTick(...)
. I realize there would be a performance penalty, but the alternative is running code in an unpredictable order, which can outright break things.The text was updated successfully, but these errors were encountered: