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 <1550603333.15.0.840002809486.issue32363@roundup.psfhosted.org>
In-reply-to
Content
> 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").
History
Date User Action Args
2019-02-19 19:08:53chris.jerdoneksetrecipients: + chris.jerdonek, asvetlov, yselivanov, Ilya.Kulakov
2019-02-19 19:08:53chris.jerdoneksetmessageid: <1550603333.15.0.840002809486.issue32363@roundup.psfhosted.org>
2019-02-19 19:08:53chris.jerdoneklinkissue32363 messages
2019-02-19 19:08:53chris.jerdonekcreate