This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author MartinAltmayer
Recipients JohannesEbke, MartinAltmayer, gvanrossum, tatellos, vstinner, yselivanov
Date 2016-06-14.07:31:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1465889474.93.0.438957112466.issue26923@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2016-06-14 07:31:14MartinAltmayersetrecipients: + MartinAltmayer, gvanrossum, vstinner, yselivanov, JohannesEbke, tatellos
2016-06-14 07:31:14MartinAltmayersetmessageid: <1465889474.93.0.438957112466.issue26923@psf.upfronthosting.co.za>
2016-06-14 07:31:14MartinAltmayerlinkissue26923 messages
2016-06-14 07:31:14MartinAltmayercreate