Message336000
> 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:53 | chris.jerdonek | set | recipients:
+ chris.jerdonek, asvetlov, yselivanov, Ilya.Kulakov |
2019-02-19 19:08:53 | chris.jerdonek | set | messageid: <1550603333.15.0.840002809486.issue32363@roundup.psfhosted.org> |
2019-02-19 19:08:53 | chris.jerdonek | link | issue32363 messages |
2019-02-19 19:08:53 | chris.jerdonek | create | |
|