HenrikBengtsson / future

:rocket: R package: future: Unified Parallel and Distributed Processing in R for Everyone
https://future.futureverse.org
956 stars 83 forks source link

BACKEND: Make it possible to override global options by backend specific arguments #344

Open HenrikBengtsson opened 5 years ago

HenrikBengtsson commented 5 years ago

Make it possible to control future-related options per backend. For example,

plan(multisession, workers = 4L, wait.interval = 0.01)

would make all (multisession) futures to wait 0.01 seconds between pools, instead of the default

getOption("future.wait.interval", as.numeric(Sys.getenv("R_FUTURE_WAIT_INTERVAL", "0.2")))

This could be done by making wait.interval an argument to and a field of the Future().

See also

HenrikBengtsson commented 3 years ago

Another example is from Issue #197;

plan(sequential, globals.maxSize = Inf)