Mark Dickinson <dicki...@gmail.com> added the comment:

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.

----------
nosy: +mark.dickinson

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43375>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to