Skip to content

Commit

Permalink
Still need explicit base::local()
Browse files Browse the repository at this point in the history
  • Loading branch information
HenrikBengtsson committed Feb 11, 2025
1 parent 4779868 commit ed27bd0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions R/evalFuture.R
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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)
Expand All @@ -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)
})
Expand Down Expand Up @@ -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])]
}
Expand Down

0 comments on commit ed27bd0

Please sign in to comment.