- Sources: primary, discussion
- Summary: The implementation gets cancellation from ordinary blocking syscalls on POSIX by setting a flag and signalling the target until it acknowledges EINTR, and on Windows by calling NtCancelSynchronousIoFile. Zig separates may-run-concurrently from must-run-concurrently at the interface, so thread pooling stays possible.
- Why it matters: The approach delivers reliable cancellation without io_uring and without the thread teardown that makes pthread_cancel awkward.
send feedback on this story