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 vstinner
Recipients giampaolo.rodola, josiah.carlson, josiahcarlson, pitrou, rhettinger, serhiy.storchaka, stutzbach, vstinner
Date 2014-05-28.22:28:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1401316134.44.0.175065366651.issue13451@psf.upfronthosting.co.za>
In-reply-to
Content
> Serhiy, perhaps it would be useful to see if such optimizations can apply to Tulip's (or asyncio's) event loop, since it will probably be the new standard in 3.4.

asyncio was designed differently. Cancelling a task doesn't remove it from a list of pending tasks. Cancelled tasks are just skipped when the event loop executes tasks.

If you look more closely, a "task" can be a Handle, Future or Task object. A Handle object has a _cancelled attribute, its cancel() method just sets this attribute to True. It's almost the same for a Future object. In the context of a Task object, cancel() is very different because it sends a CancelledError exception into the running code.

I see no possible optimization here.
History
Date User Action Args
2014-05-28 22:28:54vstinnersetrecipients: + vstinner, rhettinger, josiahcarlson, pitrou, giampaolo.rodola, josiah.carlson, stutzbach, serhiy.storchaka
2014-05-28 22:28:54vstinnersetmessageid: <1401316134.44.0.175065366651.issue13451@psf.upfronthosting.co.za>
2014-05-28 22:28:54vstinnerlinkissue13451 messages
2014-05-28 22:28:53vstinnercreate