New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Default context on MacOS should be spawn
#65
Comments
For python
|
However, using Instead of aborting and using |
Hi, I'm running into a similar issue with multiprocess. We're using p_tqdm, which uses Pathos internally, which uses this library. I have a minimized code sample which shows the issue. The code sample imports Pandas, then uses p_tqdm to run two HTTP requests in parallel.
Running this code sample on OS X gives the following output:
It then hangs forever. The I've also done the following experiments:
Questions:
|
Changes were made to python's |
I had the same issue as reported by @nickodell but using the Pool class. Since I didn't want to edit an automatically installed package, I switched to the standard lib "multiprocessing" for now, since the interface works the same for my use case: #from multiprocess import Pool
from multiprocessing import Pool
#...
with Pool(10) as p:
result = list(p.imap(test_fun, fun_inputs))
#... (I realize that this might not help someone who needs this fork specifically, but it seems to work fine with the above in a Jupyter notebook) |
The default context on MacOS was changed from
'spawn'
to'fork'
in 7257130, to be consistent with previous versions of python. This change comes frommultiprocessing
changing the default as noted in https://bugs.python.org/issue33725.The reasoning for switching back to
'fork'
is that'spawn'
causes some issues that can be seen in the examples (detailed below).The text was updated successfully, but these errors were encountered: