0xdeafbeef blog
Home Mastodon

Async cancellation and sync blocks: good luck debugging this

TL;DR: When you cancel an async task that has spawned a blocking thread, the async mutex guard gets dropped but the thread keeps running unprotected. Always pass owned guards to spawned threads. …

September 11, 2025

© 2025 deafbeef blog