[issue45021] Race condition in thread.py

Antoine Pitrou report at bugs.python.org
Tue Aug 31 08:23:44 EDT 2021


Antoine Pitrou <pitrou at free.fr> added the comment:

As the multiprocessing doc says (https://docs.python.org/3/library/multiprocessing.html#contexts-and-start-methods):
"""Note that safely forking a multithreaded process is problematic."""

The reproducer is trivially fixed by adding a call to `multiprocessing.set_start_method("forkserver")` (you can also replace "forkserver" with "spawn")

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45021>
_______________________________________


More information about the Python-bugs-list mailing list