[issue23095] [Windows] asyncio: race condition when cancelling a _WaitHandleFuture

STINNER Victor report at bugs.python.org
Wed Jan 21 23:46:32 CET 2015


STINNER Victor added the comment:

It took me several months to understand this issue. For the beginning of the story, see:
https://code.google.com/p/tulip/issues/detail?id=196

But I think that *this* issue can be closed: UnregisterWaitEx() really do what we need in asyncio.

I don't like the complex IocpProactor._unregister() function and _WaitCancelFuture class, but it looks that it's how we are supposed to wait until a wait for a handle is cancelled... Windows IOCP API is much complex that what I expected. It's probably because some parts (especially RegisterWaitForSingleObject()) are implemented with threads in user land, not in the kernel.

In short, I'm very happy that have fixed this very complex but also very annoying IOCP bug in asyncio.

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23095>
_______________________________________


More information about the Python-bugs-list mailing list