From ed27bd0582b3d31b65c146fc09a6c3bc4e231839 Mon Sep 17 00:00:00 2001 From: Henrik Bengtsson Date: Tue, 11 Feb 2025 01:00:40 -0800 Subject: [PATCH] Still need explicit base::local() --- R/evalFuture.R | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/R/evalFuture.R b/R/evalFuture.R index 786ccce8..541d8df9 100644 --- a/R/evalFuture.R +++ b/R/evalFuture.R @@ -314,7 +314,7 @@ evalFuture <- function( ## ----------------------------------------------------------------- ## Evaluate expression in a local() environment? if (local) { - tmpl_expr_local <- bquote_compile(local({ + tmpl_expr_local <- bquote_compile(base::local({ "# future:::evalFuture(): set convenient name of local environment" env <- environment() attr(env, "name") <- "future:evalenv" @@ -400,7 +400,7 @@ evalFuture <- function( ## Limit nested parallelization ## (a) Identify default number of cores - ignoring plan settings - ...future.ncores <- local({ + ...future.ncores <- base::local({ ans <- NA_integer_ options(parallelly.availableCores.fallback = 1L) @@ -423,7 +423,7 @@ evalFuture <- function( if (!is.na(...future.ncores)) { ## (b) Identify default number of cores - acknowledging plan settings - ...future.ncores <- local({ + ...future.ncores <- base::local({ nworkers <- nbrOfWorkers() min(c(nworkers, ...future.ncores), na.rm = TRUE) }) @@ -518,7 +518,7 @@ evalFuture <- function( globalenv = if (globalenv) list(added = setdiff(names(.GlobalEnv), ...future.globalenv.names)) else NULL, started = ...future.startTime ) - }, condition = local({ + }, condition = base::local({ sysCalls <- function(calls = sys.calls(), from = 1L) { calls[seq.int(from = from + skip[1L], to = length(calls) - skip[2L])] }