[issue21822] [Windows] KeyboardInterrupt during Thread.join hangs that Thread

STINNER Victor report at bugs.python.org
Mon Sep 27 10:11:30 EDT 2021


STINNER Victor <vstinner at python.org> added the comment:

I mark this issue as a duplicate of bpo-45274.

--

I fixed bpo-45274 with this change:

New changeset a22be4943c119fecf5433d999227ff78fc2e5741 by Victor Stinner in branch 'main':
bpo-45274: Fix Thread._wait_for_tstate_lock() race condition (GH-28532)
https://github.com/python/cpython/commit/a22be4943c119fecf5433d999227ff78fc2e5741

I tested join.py with the fix. It nows displays:
---
vstinner at DESKTOP-DK7VBIL C:\vstinner\python\main>python x.py
Running Debug|x64 interpreter...
started. Press Ctrl-C now
Ctrl-C [2.99]  done=True  alive=False
finish [2.99]  done=True  alive=False
Terminate batch job (Y/N)? n
---

The script no longer hangs.

----------
resolution:  -> duplicate
stage:  -> resolved
status: open -> closed
superseder:  -> Race condition in Thread._wait_for_tstate_lock()

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


More information about the Python-bugs-list mailing list