STINNER Victor <victor.stin...@haypocalc.com> added the comment: I got the debug output of test_3_join_in_forked_from_thread() using some hacks (threading._VERBOSE=True and don't hide subprocess output):
Testing with flags: sys.flags(debug=0, inspect=0, interactive=0, optimize=0, dont_write_bytecode=0, no_user_site=0, no_site=0, ignore_environment=0, verbose=0, bytes_warning=0, quiet=0) [ 1] test_threading test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown) ... <OS thread 139683761760000>: <Condition(<_thread.lock object at 0x7f0aa24b8e50>, 0)>.notify(): no waiters MainThread: <Thread(Thread-1, initial)>.start(): starting thread <OS thread 139683646777088>: <Condition(<_thread.lock object at 0x7f0aa24b8b80>, 1)>.notify(): notifying 1 waiter Thread-1: <Thread(Thread-1, started 139683646777088)>._bootstrap(): thread started MainThread: <Condition(<_thread.lock object at 0x7f0aa24b8b80>, 0)>.wait(): got it MainThread: <Condition(<_thread.lock object at 0x7f0aa24b8cc0>, 0)>.notify(): no waiters MainThread: <_MainThread(MainThread, stopped 139683761760000)>: waiting for other threads MainThread: <Thread(Thread-1, started 139683646777088)>.join(): waiting until thread stops end of main Thread-1: <Thread(Thread-2, initial)>.start(): starting thread <OS thread 139683638384384>: <Condition(<_thread.lock object at 0x7f0aa24b8b30>, 1)>.notify(): notifying 1 waiter Thread-2: <Thread(Thread-2, started 139683638384384)>._bootstrap(): thread started Thread-1: <Condition(<_thread.lock object at 0x7f0aa24b8b30>, 0)>.wait(): got it Thread-2: <_MainThread(MainThread, stopped 139683761760000)>.join(): thread stopped Thread-1: <Thread(Thread-2, started 139683638384384)>.join(): waiting until thread stops end of thread Thread-2: <Thread(Thread-2, started 139683638384384)>._bootstrap(): normal return Thread-2: <Condition(<_thread.lock object at 0x7f0aa24b8b80>, 1)>.notify(): notifying 1 waiter Thread-1: <Condition(<_thread.lock object at 0x7f0aa24b8b80>, 0)>.wait(): got it Thread-1: <Thread(Thread-2, stopped 139683638384384)>.join(): thread stopped Thread-1: <Thread(Thread-1, started 139683646777088)>._bootstrap(): normal return Thread-1: <_RLock owner='Thread-1' count=1>.acquire(True): initial success Thread-1: <Condition(<_RLock owner='Thread-1' count=1>, 0)>.notify(): no waiters Thread-1: <_RLock owner=None count=0>.release(): final release Thread-1: <Thread(Thread-1, started 139683646777088)>._bootstrap(): raised SystemExit Thread-1: <Condition(<_thread.lock object at 0x7f0aa24b8bd0>, 1)>.notify(): notifying 1 waiter MainThread: <Condition(<_thread.lock object at 0x7f0aa24b8bd0>, 0)>.wait(): got it MainThread: <Thread(Thread-1, stopped 139683646777088)>.join(): thread stopped MainThread: <_MainThread(MainThread, stopped 139683761760000)>: exiting [47121 refs] ok ---------------------------------------------------------------------- Ran 1 test in 0.095s OK [ 2] test_threading test_3_join_in_forked_from_thread (test.test_threading.ThreadJoinOnShutdown) ... <OS thread 140303874844416>: <Condition(<_thread.lock object at 0x7f9b03ea4e50>, 0)>.notify(): no waiters MainThread: <Thread(Thread-1, initial)>.start(): starting thread <OS thread 140303759861504>: <Condition(<_thread.lock object at 0x7f9b03ea4b80>, 1)>.notify(): notifying 1 waiter Thread-1: <Thread(Thread-1, started 140303759861504)>._bootstrap(): thread started MainThread: <Condition(<_thread.lock object at 0x7f9b03ea4b80>, 0)>.wait(): got it MainThread: <Condition(<_thread.lock object at 0x7f9b03ea4cc0>, 0)>.notify(): no waiters MainThread: <_MainThread(MainThread, stopped 140303874844416)>: waiting for other threads MainThread: <Thread(Thread-1, started 140303759861504)>.join(): waiting until thread stops end of main ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11870> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com