Replies: 1 comment
-
@HenrikBengtsson I would highly appreciate any ideas, comments or other input on this problem :-) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi
I am honestly not sure what title to use for this but what I would like is to parallelize a function call, and then interrupt the future when a certain (global) condition is met.
Here is a dirty, conceptual example:
Running this with plan(sequential) works fine, but this (obvilosly) does not work when running in parallell as the workers does not receive the update values of
y
andsd_y
. So can I get the same functionality in a different way?Further, if there is a way to actually stop further execution of the futures instead of returning NULL, that would be preferrable.
Moreover, I am sure using the '<<-' operator to set the global variables is not the recommended way to get access to intermediate results from the futures. Writing to disk is an alternative, but I guess that causes quite some overhead too.
Any guidance on how to approach this would be highly appreciated. I am perfectly happy with a solution that avoids starting NEW calls to
fun
if that is easier than also interrupting calls that are running in parallel with the call that meets the stopping condition.Beta Was this translation helpful? Give feedback.
All reactions