Author Jeffrey.Kintscher
Recipients Jeffrey.Kintscher, njatkinson, pitrou, xiang.zhang, xtreak
Date 2019-05-04.01:39:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1556933989.7.0.415917517056.issue33777@roundup.psfhosted.org>
In-reply-to
Content
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)>]
History
Date User Action Args
2019-05-04 01:39:49Jeffrey.Kintschersetrecipients: + Jeffrey.Kintscher, pitrou, xiang.zhang, njatkinson, xtreak
2019-05-04 01:39:49Jeffrey.Kintschersetmessageid: <1556933989.7.0.415917517056.issue33777@roundup.psfhosted.org>
2019-05-04 01:39:49Jeffrey.Kintscherlinkissue33777 messages
2019-05-04 01:39:49Jeffrey.Kintschercreate