Node.js - Timers and Scheduling
You want to execute a heavy CPU task but ensure that I/O callbacks are not blocked. Which scheduling method should you use to defer the task without blocking I/O?
process.nextTick runs before I/O events and can block them if used for heavy tasks.setImmediate schedules callbacks after I/O events, allowing I/O to proceed before heavy task runs.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions