Why not default to "globals = FALSE" if sequential or multicore plans? #627
Unanswered
scottkosty
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Thanks a lot for all of your work and community support, @HenrikBengtsson !
Collecting globals understandably takes up non-trivial time in some cases. I'm guessing my question is naive since I don't have a good understanding of the internals of 'future', forking, etc., but would it make sense to default to the behavior of "globals = FALSE" if the plan is sequential or multicore? Specifically, the default argument of "globals" could be "NA/missing/NULL" and 'future' would set the behavior according to the plan. The user could always set the argument explicitly, as now, if they preferred.
In case it is helpful to discuss in the context of an example, consider the following:
The above example succeeds for me with plans sequential and multicore; and it fails for me as expected with multisession.
I'm most interested in
future.apply
(in particular,future_lapply
), but I ask the question above in the context of vanillafuture
since it seems to be more minimal.I post this as a question, rather than an feature request, since I'm guessing it would not be a good idea, but I'm hoping to learn more about globals from your answer of why not :)
Beta Was this translation helpful? Give feedback.
All reactions