News for hackers. Stuff that matters.
Re:Async Rust Is A Bad Language by kprotty on Saturday September 09, 2023 @05:29AM (#37443598)
Not sure I follow; the cancellation logic is on both threads/tasks 1) the operation itself waiting for either the result or a cancel notification and 2) the cancellation thread sending that notification.

The cancellation thread is generally the one doing the `select` so it spawns the operation thread(s) and waits for (one of) their results (i.e. through a channel/event). The others which lose the race are sent the cancellation signal and optionally joined if they need to be (i.e. they use intrusive memory).

There are no comments on this comment yet.