Author chris.jerdonek
Recipients Ilya.Kulakov, asvetlov, chris.jerdonek, yselivanov
Date 2019-02-19.20:07:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Well, if you want to unconditionally end tasks you shouldn't write coroutines that ignore CancelledErrors.

Well, of course. But code can have bugs, and maybe you didn't write the coroutine because it's from a library that you don't control. In that case, you should still be able to end the task. Also, maybe the coroutine doesn't have a bug but the cancellation is just taking longer than you have time for, so you want to end it early.

> So what are those real-world cases that can explain why asyncio should support this functionality?

The case I had in mind was the one I referenced above -- being able to distinguish a normal CancelledError from one where you had interrupt the cancellation (i.e. cancellation timing out). I would like the caller to be able to know when the latter are happening.
Date User Action Args
2019-02-19 20:07:03chris.jerdoneksetrecipients: + chris.jerdonek, asvetlov, yselivanov, Ilya.Kulakov
2019-02-19 20:07:03chris.jerdoneksetmessageid: <>
2019-02-19 20:07:03chris.jerdoneklinkissue32363 messages
2019-02-19 20:07:03chris.jerdonekcreate