Closed spion-h4 closed 6 years ago
Never mind, I took a closer look the condition does pick setImmediate
when its available. So this is not an issue in environments where thats present (although it might still be an issue in older node versions).
Hi! I noticed bcrypt.js uses
process.nextTick
in node to delay the calculation.Unfortunately, repeated calls to nextTick will still starve the event loop: https://nodejs.org/en/docs/guides/event-loop-timers-and-nexttick/#process-nexttick
nextTick is unfortunately badly named, it should've been called 'endOfThisTick`.
Can we switch to
setImmediate
instead?