[issue41539] print blocks with multiprocessing and buffered output
Antoine Pitrou
report at bugs.python.org
Sat Jun 26 04:10:31 EDT 2021
Antoine Pitrou <pitrou at free.fr> added the comment:
This is just issue6721 again.
The workaround is easy: just add `multiprocessing.set_start_method("forkserver")` at the start of your program.
Also, this is more or less documented, though quite tersely:
"""Note that safely forking a multithreaded process is problematic.""
https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods
----------
resolution: -> duplicate
stage: -> resolved
status: open -> closed
superseder: -> Locks in the standard library should be sanitized on fork
versions: +Python 3.10, Python 3.11, Python 3.9
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue41539>
_______________________________________
More information about the Python-bugs-list
mailing list