-
Notifications
You must be signed in to change notification settings - Fork 519
Open
Labels
Description
It's available as of v11—isn't it better than process.nextTick
? https://nodejs.org/api/globals.html#queuemicrotaskcallback
Lines 239 to 255 in d336bd1
const enqueuePostPromiseJob = | |
typeof process === 'object' && typeof process.nextTick === 'function' | |
? function (fn) { | |
if (!resolvedPromise) { | |
resolvedPromise = Promise.resolve(); | |
} | |
resolvedPromise.then(() => { | |
process.nextTick(fn); | |
}); | |
} | |
: typeof setImmediate === 'function' | |
? function (fn) { | |
setImmediate(fn); | |
} | |
: function (fn) { | |
setTimeout(fn); | |
}; |
Just a question...
Thanks,
A.