[issue21822] KeyboardInterrupt during Thread.join hangs that Thread

Antoine Pitrou report at bugs.python.org
Mon Apr 30 17:39:14 EDT 2018


Antoine Pitrou <pitrou at free.fr> added the comment:

> I'm guessing this is because of the perceived performance impact?

The problem is polling is pretty detrimental to power saving on modern CPUs.  There might also be a performance impact that makes things worse :-)

More generally, we really would like locks to be interruptible under Windows, as it would be useful in many more situations than joining threads. Unfortunately, as you have discovered we have several lock implementations for Windows right now.  The SRWLock one is probably difficult to make interruptible, but it's never enabled by default.  The Semaphore one looks legacy, so could perhaps be removed.  Remains the condition variable-based implementation.

----------

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


More information about the Python-bugs-list mailing list