[issue31033] Add argument to .cancel() of Task and Future
Yury Selivanov
report at bugs.python.org
Tue Jul 25 11:21:42 EDT 2017
Yury Selivanov added the comment:
> Yes, I agree with you about my weird way of debugging. But anyway, changing API with adding ability to pass actual cause would be welcome.
I'm not opposed to the idea, btw. If we do decide to add an argument to 'cancel', we probably should do the same for concurrent.futures.
Another possibility would be to allow cancellation via Future.set_exception:
task.set_exception(asyncio.CancelledError('message'))
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue31033>
_______________________________________
More information about the Python-bugs-list
mailing list