Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

_IocpProactor implementation causes race condition (on Windows) #55

Closed
peterazmanov opened this issue Nov 18, 2015 · 0 comments
Closed

Comments

@peterazmanov
Copy link
Contributor

Quamash uses separate thread for event polling. Polling in separate thread can cause race condition with 'event initiation' which is handled in MainThread. E.g. method recv of asyncio.windows_events.IocpProactor starts waiting to receive data from socket (via call to WSARecv) in MainThread. Before recv calls self._register(ov, conn, finish_recv) to register event in self._cache event is received in parallel poller thread (via call to GetQueuedCompletionStatus) and causes KeyError, in this case event is lost forever and app hangs on exit. I believe this bug is the reason for hangs in PR #44 (issue #38).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants