Author chris.jerdonek
Recipients Ilya.Kulakov, asvetlov, chris.jerdonek, yselivanov
Date 2019-02-19.19:08:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> Use Task.cancel() or use a Queue to communicate with the task.

One reason why Task.cancel() is an incomplete replacement for Task.set_exception() is that you don't have an easy way to communicate why the task was ended.

With set_exception() and set_result(), you could. Task.cancel(), though, doesn't let you e.g. specify a CancelledError subclass or "reason" string (see the related bpo-35674, "Add argument to .cancel() of Task and Future").
Date User Action Args
2019-02-19 19:08:53chris.jerdoneksetrecipients: + chris.jerdonek, asvetlov, yselivanov, Ilya.Kulakov
2019-02-19 19:08:53chris.jerdoneksetmessageid: <>
2019-02-19 19:08:53chris.jerdoneklinkissue32363 messages
2019-02-19 19:08:53chris.jerdonekcreate