image.png

    1. ┌───────────────────────────┐
    2. ┌─ │ timers │
    3. │ └─────────────┬─────────────┘
    4. │ ┌─────────────┴─────────────┐
    5. │ │ pending callbacks │
    6. │ └─────────────┬─────────────┘
    7. │ ┌─────────────┴─────────────┐
    8. │ │ idle, prepare │
    9. │ └─────────────┬─────────────┘ ┌───────────────┐
    10. │ ┌─────────────┴─────────────┐ │ incoming: │
    11. │ │ poll │ ─────┤ connections, │
    12. │ └─────────────┬─────────────┘ │ data, etc. │
    13. │ ┌─────────────┴─────────────┐ └───────────────┘
    14. │ │ check │
    15. │ └─────────────┬─────────────┘
    16. │ ┌─────────────┴─────────────┐
    17. └──┤ close callbacks │
    18. └───────────────────────────┘

    image.png

    image.png
    image.png