DeepFrontend
Learning Paths
Practice
System Design & DS
Design Studio
Data Structures Curriculum
Real-World Case Studies
Careers
Job Board
Resume Builder
Blog
Sign in
Search
⌘K
Go Pro
Loading compiler resources...
Node.js Quiz Practice
Active Recall Drill Session
← Exit Session
Question 1 of 1
hard
Node.js
A setImmediate call is scheduled from INSIDE an fs.readFile callback (already executing in the poll phase). A setTimeout(fn, 0) is scheduled at the exact same moment. Which runs first?
A
setTimeout always wins
B
setImmediate always wins, since check is the very next phase after poll in the same iteration
C
It's random
D
Neither runs until the next process restart
Check Answer