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 iritkatriel
Recipients iritkatriel, mj4int
Date 2020-10-05.23:01:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1601938871.87.0.980458788462.issue32902@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2020-10-05 23:01:11iritkatrielsetrecipients: + iritkatriel, mj4int
2020-10-05 23:01:11iritkatrielsetmessageid: <1601938871.87.0.980458788462.issue32902@roundup.psfhosted.org>
2020-10-05 23:01:11iritkatriellinkissue32902 messages
2020-10-05 23:01:11iritkatrielcreate