4 ms·
> One mechanism that doesn't seem to be mentioned is the .net style "manual" cancellation where CancellationToken is passed around everywhere and manually check
by yoshuaw 5y ago
> One mechanism that doesn't seem to be mentioned is the .net style "manual" cancellation where CancellationToken is passed around everywhere and manually checked, often throwing an exception to early return.
The async-rs/stop-token [1] library does exactly this.
This post is just the first in a series. In a follow-up post I'm planning to zoom in on the uses and design of cancellation tokens.
[1]: https://github.com/async-rs/stop-token https://github.com/async-rs/stop-token
- fowl2 5y agolooking forward to it!