[issue46726] Thread spuriously marked dead after interrupting a join call

Tim Peters report at bugs.python.org
Sat Feb 12 13:58:50 EST 2022


Tim Peters <tim at python.org> added the comment:

Eryk, I don't think that workaround is solid on Windows in all cases. For example, if .join() is called with a timeout, the same timeout is passed to lock.acquire(block, timeout). If the acquire() in fact times out, but the store to the `acquired` variable is interrupted, `if _WINDOWS and acquired is None` will succeed, despite that the lock is still locked. Then we go on to - again - incorrectly release the lock and call _stop().

But please don't "repair" that: platform-specific tricks aren't on a path to an actual solution ;-) If the latter requires some new C code, fine.

----------
nosy: +tim.peters

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


More information about the Python-bugs-list mailing list