[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture
STINNER Victor
report at bugs.python.org
Fri Jan 23 02:36:28 CET 2015
STINNER Victor added the comment:
Running "runtests.py test_cancel_post_init test_shell" and "runtests.py test_wait_for_handle test_wait_for_handle_cancel" of Tulip show a different behaviour of _WaitHandleFuture. In one case, the cancelled wait is still signaled, on other case, it's never signaled.
Currently, a cancelled _WaitHandleFuture always unregisters the overlapped operation, which causes unexpected event or may lead tests to hang. Never unregisters causes a different issue. Unregistering the overlapped indirectly delete it in memory, which is bad if the completion is still signaled.
A workaround is to keep a reference to the unregistered overlopped, but it's an ugly workaround.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23095>
_______________________________________
More information about the Python-bugs-list
mailing list