Open joernhees opened 7 years ago
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.
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.