On Nov 19 11:06, Jeremy Drake via Cygwin-patches wrote: > (I searched for other callers of terminate_thread after this, and the only > one left without CancelSynchronousIo is in ldap.cc and I'm pretty sure > that's a "can't happen" case.)
I'm inclined to push your patch, but I'm not quite sure here... Yes, terminate_thread called from ldap.cc is an unlikely last resort kind of thing. And there are more places calling terminate_thread(). But none of them are terminating the wait_thread, so they shouldn't matter in this scenario. I think? Assuming they do matter, CancelSynchronousIo() only makes sense if the thread hangs in synchronous IO. Other internal threads use WFMO, and I don't see that you can avoid a TerminateThread in these cases. But those are covered by the neat SuspendThread/GetThreadContext trick, right? Thanks, Corinna