Message 413613 - Python tracker (original) (raw)
This should be solved when using the cancel count -- the explicit cancel bumps the cancel count so the cancel scope (i.e. timeout()) will not raise TimeoutError.
Hmmm. Interesting!
Timeouts are not the single primitive that should care about the cancellation source.
Suppose, async code reconnects on network problem but should be terminated on explicit task cancelling. Could cancel count be used here? Is the approach generic enough? My first answer is "why not?"