The --venv
mode pex
script does not have a __name__ == '__main__'
guard breaking multiprocessing.
#1236
Labels
--venv
mode pex
script does not have a __name__ == '__main__'
guard breaking multiprocessing.
#1236
The multiprocessing module relies on being able to import the file run as
__main__
from spawned subprocesses without the side-effect of actually running__main__
code. See "Safe importing of main module" here: https://docs.python.org/3/library/multiprocessing.html#the-spawn-and-forkserver-start-methodsTo play well with multiprocessing, the
pex
script should get a__main__
guard.This was spotted over in #1235.
The text was updated successfully, but these errors were encountered: