Message302521
The threading main_thread() instance is associated to the thread that first imports the threading module. In usual circumstances, this will indeed be the interpreter's main thread. However, it is not always the case. See attached reproducer.
$ ./python mainthread2.py
child thread: <_MainThread(MainThread, started 140399567398656)>
main thread: <_DummyThread(Dummy-1, started daemon 140399588386560)>
Exception ignored in: <module 'threading' from '/home/antoine/cpython/default/Lib/threading.py'>
Traceback (most recent call last):
File "/home/antoine/cpython/default/Lib/threading.py", line 1268, in _shutdown
assert tlock.locked()
AssertionError: |
|
Date |
User |
Action |
Args |
2017-09-19 13:00:11 | pitrou | set | recipients:
+ pitrou |
2017-09-19 13:00:11 | pitrou | set | messageid: <1505826011.26.0.999867844657.issue31517@psf.upfronthosting.co.za> |
2017-09-19 13:00:11 | pitrou | link | issue31517 messages |
2017-09-19 13:00:11 | pitrou | create | |
|