News for hackers. Stuff that matters.
Re:How to think about `async`/`await` in Rust by Spivak on Wednesday July 05, 2023 @02:25PM (#36604829)
You're describing exactly why it's painful for threads. If you only cancel co-routines at yield points (which unless you do dark magic is the only time you can cancel them) is always safe.

A co-routine that yields in the middle of an atomic operation is an oxymoron. Anything can happen before you're scheduled again.

There are no comments on this comment yet.