Jeffrey Kintscher <websur...@surf2c.net> added the comment:
I also see inconsistent behaviorbetween the enumerate() functions in threading and dummy_threading: Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from threading import Thread >>> from threading import enumerate >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.start() foo >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.is_alive() False >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] >>> t.join() >>> enumerate() [<_MainThread(MainThread, started 4618048960)>] Python 3.7.3 (default, May 1 2019, 00:00:47) [Clang 10.0.1 (clang-1001.0.46.4)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from dummy_threading import Thread >>> from dummy_threading import enumerate >>> enumerate() [<_MainThread(MainThread, started 1)>] >>> def f(): print('foo') ... >>> t = Thread(target=f) >>> enumerate() [<_MainThread(MainThread, started 1)>] >>> t.start() foo >>> enumerate() [] >>> t.is_alive() True >>> enumerate() [] >>> t.join() >>> enumerate() [<_DummyThread(Dummy-2, started daemon 1)>] ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33777> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com