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

LocalCluster in processes=False doesnt accept the keyword worker_class #2447

Open
redsum opened this issue Jan 2, 2019 · 2 comments
Open

Comments

@redsum
Copy link

redsum commented Jan 2, 2019

this will fail

from distributed import Worker
cluster = LocalCluster(processes=False, worker_class=Worker)

while this will pass

from distributed import Worker
cluster = LocalCluster(processes=True, worker_class=Worker)
@mrocklin
Copy link
Member

mrocklin commented Jan 4, 2019

Yes, the processes= keyword is really just syntactic sugar around using the Nanny rather than the Worker class.

What is it that you're trying to achieve?

@redsum
Copy link
Author

redsum commented Jan 5, 2019

I'm using multiprocessing, and i want to have a custom initialization for each process
So i use the c'tor of the worker to perform the initialization

But the main point here is that There shouldn't be a difference in API of multiprocessing and Multithreading

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

No branches or pull requests

2 participants