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
I ask this because with while (queue.length) { resolve(queue.shift()); }, it will throw these non blocking jobs on the Queue and each one will run async since I/O operations are natively non-blocking, This would be done without process.nextTick(). However, since we are using process.nextTick()...which is blocking(in contrast to setImmediate()), doesn't this defeat async nature?
The text was updated successfully, but these errors were encountered:
@dman777 I see. I guess I haven't read enough about those functions to understand the difference between them. Now when I have, I agree with you that setImmediate() should be used instead.
I was studying your code for learning purposes. In
collectFilesToInject
, why do you useprocess.nextTick
in:I ask this because with
while (queue.length) { resolve(queue.shift()); }
, it will throw these non blocking jobs on the Queue and each one will run async since I/O operations are natively non-blocking, This would be done withoutprocess.nextTick()
. However, since we are usingprocess.nextTick()
...which is blocking(in contrast tosetImmediate()
), doesn't this defeat async nature?The text was updated successfully, but these errors were encountered: