|
|
|
|
|
by charcircuit
1083 days ago
|
|
>In regular threaded programming, cancellation is a bit more painful No, it isn't. Nothing is stopping your threading library from implementing the same thing. It just turns out it is a bad idea to kill threads at random points in time because they may own things like locks. Or in the case of async await doing something that is thought to be atomic. |
|
A co-routine that yields in the middle of an atomic operation is an oxymoron. Anything can happen before you're scheduled again.