Kyle Stanley <aeros...@gmail.com> added the comment:

> So, we can't rely on checking ``self.done() and self._cancel_requested`` for 
> future.cancelled() as this would mean that future.cancelled() would return 
> true for a future that fully completed if `future.cancel()` was called after 
> it finished (which is incorrect).

This should be "was called *as* it finished", not "was called *after* it was 
finished". If gather_future.cancel() is called after the future is `FINISHED`, 
it will immediately return false since it checks `self.done()` first 
(https://github.com/python/cpython/blob/b8f67c0923ac85468dfbfd43375e0bbfb6ca50ea/Lib/asyncio/tasks.py#L727).

----------

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

Reply via email to