This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients igorvm, mark.dickinson
Date 2021-03-02.18:32:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614709976.91.0.9679369133.issue43375@roundup.psfhosted.org>
In-reply-to
Content
I'm not sure that this counts as a bug.

Each non-daemon thread adds a lock to the threading._shutdown_locks set: https://github.com/python/cpython/blob/8b795ab5541d8a4e69be4137dfdc207714270b77/Lib/threading.py#L933-L935.

That lock is removed when the thread is "join"ed: https://github.com/python/cpython/blob/8b795ab5541d8a4e69be4137dfdc207714270b77/Lib/threading.py#L988-L990

So the simple solution is to make sure that you always join your threads (which I'd expect normal code to do for non-daemon threads anyway), or to make your threads daemon threads.
History
Date User Action Args
2021-03-02 18:32:56mark.dickinsonsetrecipients: + mark.dickinson, igorvm
2021-03-02 18:32:56mark.dickinsonsetmessageid: <1614709976.91.0.9679369133.issue43375@roundup.psfhosted.org>
2021-03-02 18:32:56mark.dickinsonlinkissue43375 messages
2021-03-02 18:32:56mark.dickinsoncreate