An incident

  1. Start with task(macro task) (usually start with script script)
  2. Sweep all microtasks encountered during the task run
  3. Find the next task

Microtask

  1. Promise
  2. process.nextTick node

When a Mirotask is encountered during the execution of an event, it is stored in a MicroTask queue and executed after all synchronization tasks in the task are completed

task

  1. I/O
  2. setTimeout
  3. setInterval
  4. requestAnimationFrame web
  5. setImmediate node