Skip to content

Commit f9bcf57

Browse files
MulticoreFuture is now using evalFuture() directly
1 parent 84e3a2a commit f9bcf57

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

R/backend_api-MulticoreFuture-class.R

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,7 @@ run.MulticoreFuture <- function(future, ...) {
4848

4949
mcparallel <- importParallel("mcparallel")
5050

51-
expr <- getExpression(future)
52-
envir <- future$envir
51+
data <- getFutureData(future)
5352

5453
t_start <- Sys.time()
5554

@@ -73,11 +72,10 @@ run.MulticoreFuture <- function(future, ...) {
7372
## Add to registry
7473
FutureRegistry(reg, action = "add", future = future, earlySignal = TRUE)
7574

76-
future.args <- list(expr)
7775
job <- local({
7876
oopts <- options(mc.cores = NULL)
7977
on.exit(options(oopts))
80-
do.call(parallel::mcparallel, args = future.args, envir = envir)
78+
mcparallel(evalFuture(data))
8179
})
8280

8381
future$job <- job

0 commit comments

Comments
 (0)