[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

Paul Goins report at bugs.python.org
Mon Apr 30 17:16:25 EDT 2018


Paul Goins <paul.d.goins at intel.com> added the comment:

Focusing on the Windows case specifically...  One way to possibly make this work (although perhaps not as clean as may be desired) would be to add polling logic into the thread_nt.h version of PyThread_acquire_lock_timed.

That would have the benefit of avoiding the complexity of the various "non recursive mutex" implementations (i.e. semaphores vs "emulated" condition variables vs native condition variables) and may be less code than setting up "alertable" WaitForObjectSignleObjectEx calls (plus whatever else needs to be done for the SRW-lock-based code path).

Thoughts or feedback?  (I've not done any mainline Python commits yet so I'm totally ready to be completely wrong or misguided here.)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue21822>
_______________________________________


More information about the Python-bugs-list mailing list