Steve Stagg <stest...@gmail.com> added the comment:

Minimal test case:

====
import sys, threading

def run():
    for i in range(10000000):
        sys.stderr.write(' =.= ')

if __name__ == '__main__':
    threading.Thread(target=run, daemon=True).start()
===

I think this is expected behaviour.  My knowledge isn't complete here, but 
something similar to:

* During shutdown, the daemon threads are aborted
* In your example, the thread is very likely to be busy doing IO, so holding 
the io lock.
* The abort you're seeing is an explicit check/abort to avoid a deadlock 
(https://bugs.python.org/issue23309).

----------
nosy: +stestagg

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

Reply via email to