Dieter Maurer <die...@handshake.de> added the comment:
Apparently, the explanation is not that easy: `_stop` first sets `_is_stopped` to `True` and only then `_tstate_lock` to `None`. Therefore, the race should not cause the `AssertionError`. I observed the `AssertionError` in Python 3.6. The related `threading` code is however almost identical to that in Python 3.11. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue47246> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com