Eryk Sun <eryk...@gmail.com> added the comment:
> Anything at the Python level that cares whether the thread is > still alive will call _wait_for_tstate_lock() again It's nice that _maintain_shutdown_locks() gets called in _stop(), but the more important call site is in _set_tstate_lock(). I typed up the example initially with try/finally. Then I changed it to avoid the extra lock.locked() call when there's no exception, but I forgot to add a `raise` statement: try: if lock.acquire_and_release(block, timeout): self._stop except: if not lock.locked(): self._stop() raise ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue46726> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com