Skip to content

Commit b998338

Browse files
The default nested plan is always sequential, regardless of R_FUTURE_PLAN
1 parent 1e7ad50 commit b998338

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

R/backend_api-ClusterRegistry.R

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,11 @@ ClusterRegistry <- local({
4747

4848
.makeCluster <- function(workers, ...) {
4949
if (length(workers) == 0L) return(NULL)
50+
oenv <- Sys.getenv("R_FUTURE_PLAN", NA_character_)
51+
Sys.unsetenv("R_FUTURE_PLAN")
52+
on.exit({
53+
if (!is.na(oenv)) Sys.setenv(R_FUTURE_PLAN = oenv)
54+
})
5055
cl <- makeClusterPSOCK(workers, ...)
5156
cl <- addCovrLibPath(cl)
5257
cl

R/backend_api-Future-class.R

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -783,8 +783,7 @@ getFutureContext <- function(future, mc.cores = NULL, local = TRUE, ..., debug =
783783
## Use default future strategy + identify packages needed by the backend
784784
if (length(strategiesR) == 0L) {
785785
if (debug) mdebug("Packages needed by future strategies (n = 0): <none>")
786-
strategiesR <- getOption("future.plan")
787-
if (is.null(strategiesR)) strategiesR <- sequential
786+
strategiesR <- sequential
788787
backendPackages <- c("future")
789788
} else {
790789
## Identify package namespaces needed for strategies

0 commit comments

Comments
 (0)