http://bugs.winehq.org/show_bug.cgi?id=60315 --- Comment #8 from Zeb Figura <z.figura12@gmail.com> --- (In reply to Zeb Figura from comment #7)
(In reply to Zeb Figura from comment #6)
I spent way too long wading through the AI garbage, but there is a bug here, it's that if an APC gets queued to a thread about to die, it can get lost. A thread does a select after terminate_thread to clear out APCs, but APCs can still be queued after that. In the offending case it's APC_ASYNC_IO.
Actually no, this doesn't make sense, because the APC_ASYNC_IO is supposedly triggered by cancel_terminating_thread_asyncs(), but that happens before the select. The general problem still exists with externally queued APCs but it shouldn't affect asyncs. Something else must be happening.
Oh, no, it does make sense because this is winedevice, and cancellation is async; it might reach the server after the select but before the thread actually dies. I'm surprised that race gets hit in practice; I'd expect winedevice to always be slower, but it is a valid race. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.