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

how to run a task on each worker? #56

Open
joernhees opened this issue May 7, 2017 · 1 comment
Open

how to run a task on each worker? #56

joernhees opened this issue May 7, 2017 · 1 comment

Comments

@joernhees
Copy link
Contributor

is there an easy way to run a function on each worker?

I have a scenario where i'd like to trigger writing stats on program termination on each worker. Each of the workers has a local cache etc. and syncing the stats during computation would cause a lot of stupid overhead.

@soravux
Copy link
Owner

soravux commented Jun 7, 2017

There is currently no way in the API to do this explicitly. API proposals for this are welcome for discussion.

To solve your problem, you could either add a callback to your futures or, at the end of your futures, perform a stats write if the last time it was performed is longer than a desired amount of time.

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