This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: assert on getting the representation of a thread in atexit function
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.5
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: xdegaye
Priority: normal Keywords:

Created on 2015-03-24 20:20 by xdegaye, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (1)
msg239175 - (view) Author: Xavier de Gaye (xdegaye) * (Python triager) Date: 2015-03-24 20:20
The following 'thread_repr.py' script:
--------------------------------------

import threading, atexit

def foo():
    print(threading.currentThread())

atexit.register(foo)



gives the following output:
---------------------------

Error in atexit._run_exitfuncs:
Traceback (most recent call last):
  File "thread_repr.py", line 4, in foo
    print(threading.currentThread())
  File "/usr/local/lib/python3.5/threading.py", line 826, in __repr__
    self.is_alive() # easy way to get ._is_stopped set when appropriate
  File "/usr/local/lib/python3.5/threading.py", line 1122, in is_alive
    self._wait_for_tstate_lock(False)
  File "/usr/local/lib/python3.5/threading.py", line 1078, in _wait_for_tstate_lock
    assert self._is_stopped
AssertionError
History
Date User Action Args
2022-04-11 14:58:14adminsetgithub: 67956
2019-04-13 18:52:57xdegayesetstatus: open -> closed
resolution: out of date
stage: resolved
2015-03-24 20:20:09xdegayecreate