Skip to content
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

forking for new processes is discouraged and might lead to deadlocks in the child. #94

Closed

Conversation

maurerle
Copy link
Collaborator

@maurerle maurerle commented Sep 2, 2024

See python/cpython#84559 and of course
https://pythonspeed.com/articles/python-multiprocessing/

This does only fix the warning which comes up starting from python 3.12 - this config should be used in user code in the beginning somewhere.
We could also set this manually in mango generally, though this leaves the user less choice.

When using the spawn method instead of fork, all process memory has to be pickled first, leaving extra steps when using the serializer methods currently..

I might improve this in this PR as well

@maurerle
Copy link
Collaborator Author

maurerle commented Sep 9, 2024

This removes multiprocessing warning but breaks pickling of enum in other tests, when all tests are executed in one run, so I'll close this for now..

@maurerle maurerle closed this Sep 9, 2024
@maurerle maurerle deleted the fix_multiprocessing_fork branch October 31, 2024 09:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant