Message268537
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. |
|
Date |
User |
Action |
Args |
2016-06-14 07:31:14 | MartinAltmayer | set | recipients:
+ MartinAltmayer, gvanrossum, vstinner, yselivanov, JohannesEbke, tatellos |
2016-06-14 07:31:14 | MartinAltmayer | set | messageid: <1465889474.93.0.438957112466.issue26923@psf.upfronthosting.co.za> |
2016-06-14 07:31:14 | MartinAltmayer | link | issue26923 messages |
2016-06-14 07:31:14 | MartinAltmayer | create | |
|