Message219316
> 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. |
|
Date |
User |
Action |
Args |
2014-05-28 22:28:54 | vstinner | set | recipients:
+ vstinner, rhettinger, josiahcarlson, pitrou, giampaolo.rodola, josiah.carlson, stutzbach, serhiy.storchaka |
2014-05-28 22:28:54 | vstinner | set | messageid: <1401316134.44.0.175065366651.issue13451@psf.upfronthosting.co.za> |
2014-05-28 22:28:54 | vstinner | link | issue13451 messages |
2014-05-28 22:28:53 | vstinner | create | |
|