3 ms·
This was deterministic (cooperative). And yes, you can absolutely handle it by throwing an exception. But cancellation is such a common mechanism that you'd wa
by int_19h 10y ago
This was deterministic (cooperative).
And yes, you can absolutely handle it by throwing an exception. But cancellation is such a common mechanism that you'd want to have 1) a standard exception type that can be used to indicate it, and that other async operations can handle in a composable fashion, and 2) a standard mechanism to request cancellation cooperatively, again, so that various layers can collaborate on handling a high-level cancellation request all the way to the lowest level like an I/O read.
And that's what this proposal was all about.