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

lambda and nested functions #13

Open
wjaskowski opened this issue Feb 23, 2018 · 3 comments
Open

lambda and nested functions #13

wjaskowski opened this issue Feb 23, 2018 · 3 comments
Labels
enhancement pull-request-welcome Happy to review a PR for this feature

Comments

@wjaskowski
Copy link

Do you see any possibilities to allow lambda or nested functions with parmap.map?

@zeehio
Copy link
Owner

zeehio commented Mar 1, 2018

Not really. Unfortunately lambda functions are not pickable, so they are not suitable for multiprocessing.

There are some workarounds, see for instance: https://stackoverflow.com/questions/4827432/how-to-let-pool-map-take-a-lambda-function

I'll close this because I can't fix it, but feel free to comment if you have doubts.

@zeehio zeehio closed this as completed Mar 1, 2018
@zeehio zeehio added the wontfix label Mar 1, 2018
@wjaskowski
Copy link
Author

What about using https://github.com/pya/pickablelambda under the hood?

@zeehio zeehio added enhancement and removed wontfix labels Mar 2, 2018
@zeehio
Copy link
Owner

zeehio commented Mar 2, 2018

Looks good! I don't have much free time right now to implement this. Feel free to submit a pull request if you want, otherwise I will do the work eventually 👍

@zeehio zeehio reopened this Mar 2, 2018
@zeehio zeehio added the pull-request-welcome Happy to review a PR for this feature label May 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement pull-request-welcome Happy to review a PR for this feature
Projects
None yet
Development

No branches or pull requests

2 participants