Skip to content

Instantly share code, notes, and snippets.

@korzio
Created May 16, 2020 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save korzio/5f4f6fd1f4338d1213d75b6c907966e1 to your computer and use it in GitHub Desktop.
Save korzio/5f4f6fd1f4338d1213d75b6c907966e1 to your computer and use it in GitHub Desktop.
┌───────────────────────────┐
┌─>│ timers │ # setTimeout, setInterval
│ └─────────────┬─────────────┘
│ ┌─────────────┴─────────────┐
│ │ pending callbacks │
│ └─────────────┬─────────────┘
│ ┌─────────────┴─────────────┐
│ │ idle, prepare │ # system
│ └─────────────┬─────────────┘ ┌───────────────┐
│ ┌─────────────┴─────────────┐ │ incoming: │
│ │ poll │<─────┤ connections, │
│ └─────────────┬─────────────┘ │ data, etc. │
│ ┌─────────────┴─────────────┐ └───────────────┘
│ │ check │ # setImmediate
│ └─────────────┬─────────────┘
│ ┌─────────────┴─────────────┐
└──┤ close callbacks │
└───────────────────────────┘
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment