Advanced
Flutter
Q92 / 100
How does Dart's event loop handle microtasks vs the event queue?
Correct! Well done.
Incorrect.
The correct answer is B) Microtask queue (higher priority — Future.then callbacks) is fully drained before the event queue (I/O, timers) processes its next event
B
Correct Answer
Microtask queue (higher priority — Future.then callbacks) is fully drained before the event queue (I/O, timers) processes its next event
Explanation
Dart's event loop processes the microtask queue (scheduleMicrotask, Future.then callbacks) completely before handling the next item in the event queue (Timer, I/O completions). This ensures promise-like chains resolve before I/O events.
Progress
92/100