Irit Katriel <iritkatr...@yahoo.com> added the comment:

stdout is indeed shared between all threads, and it is also not guaranteed to 
be thread safe, so if two threads write to it simultaneously that can cause 
problems.

It is better to have one thread in you program writing to stdout, with 
thread-safe communication channels from other threads to this one.

Alternatively, you can create different processes instead of threads, and then 
each process will have its own stdout and redirecting one will not impact the 
others.

----------
nosy: +iritkatriel

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

Reply via email to