Skip to content

Instantly share code, notes, and snippets.

@kkaefer
Created July 7, 2015 15:25
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 kkaefer/0162e83f74a58417042d to your computer and use it in GitHub Desktop.
Save kkaefer/0162e83f74a58417042d to your computer and use it in GitHub Desktop.
┏━━━━━━━━━━━━━━┓ ┏━━━━━━━━━━━━━━┓
┃ Thread A ┃ ┃ Thread B ┃
┗━━━━━━━━━━━━━━┛ ┗━━━━━━━━━━━━━━┛
│ │
│ │
│ │
│ │
┌────────┴─────────┐ │
│Create uv_async_t │ │
└────────┬─────────┘ │
│ │
│ ┌───────┴───────┐
┌─────┴──────┐ ┌──────│uv_async_send()│
│ Callback │◀────┘ │ │
│ │ │ │
│ │ │ │
│┌──────────┐│ │ │
││uv_close()│├─┐ │ │
│└──────────┘│ │ │ │
│ │ │ │ │
└─────┬──────┘ │ │ │
│ │ │ │
┌──┴───┐ │ │ │
│delete│ │ │ │
│handle│◀───┘ │ │
└──┬───┘ │ │
│ │ ┌────────┐ │
│ │ │ CRASH │ │
│ │ └────────┘ │
│ └───────┬───────┘
│ │
▼ ▼
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment