New submission from Xavier de Gaye:

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

----------
components: Library (Lib)
messages: 239175
nosy: xdegaye
priority: normal
severity: normal
status: open
title: assert on getting the representation of a thread in atexit function
type: behavior
versions: Python 3.5

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23768>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to