-
Notifications
You must be signed in to change notification settings - Fork 214
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
Feature request: support for multiprocessing.Pool "initializer". #231
Comments
Hi @gwerbin, as you may have noticed, both @nalepae and me are currently super busy. I'm trying to keep this package running as best as I can, but I don't really have the time to expand it. However, I very much see how this could be useful, and if you're willing to draft a PR I would gladly review and merge it. From scanning the code I also suspect it wouldn't be a big change. |
Yep, if you can provide a PR (with tests and docs) it could be super nice! |
Initial draft implementation of nalepae#231
I realized this was a very small change, so I went ahead and created #232 |
Pandaral·lel is looking for a maintainer! |
The
multiprocessing.Pool
interface provides the ability to pass a custom "initializer" function to each worker: https://docs.python.org/3/library/multiprocessing.html#multiprocessing.pool.Pool.This is useful for things like suppressing specific warnings, setting up logging, and other "scaffolding" that is occasionally useful (or even required) in applications.
It seems like Pandarallel does not use its own initializer function, so it would be nice if users could provide their own.
Looking over the code, this seems like a relatively unintrusive backward-compatible change that most users won't notice at all, but would benefit the small number of users who do want or need this feature.
Hypothetical usage:
The text was updated successfully, but these errors were encountered: