Martin Altmayer added the comment:

I don't think this is a mere documentation problem: If a future cannot be 
cancelled because it is already done, cancel must return False.

As Johannes' example demonstrates, a wrong return value from cancel might lead 
to a cancelled task being continued as if nothing happened:  If Task.cancel 
receives a false positive from its _fut_waiter, it will not throw a 
CancelledError into the task (_must_cancel=True), but simply continue the task.

----------
nosy: +MartinAltmayer

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue26923>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to