Skip to content

Commit 56e7cf2

Browse files
drop duplicate code
1 parent 5995d3a commit 56e7cf2

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

R/backend_api-ClusterFutureBackend-class.R

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -192,27 +192,3 @@ launchFuture.ClusterFutureBackend <- function(backend, future, ...) {
192192

193193
invisible(future)
194194
}
195-
196-
197-
198-
MultisessionFutureBackend <- function(workers = availableCores(), ...) {
199-
default_workers <- missing(workers)
200-
if (is.function(workers)) workers <- workers()
201-
workers <- structure(as.integer(workers), class = class(workers))
202-
stop_if_not(length(workers) == 1, is.finite(workers), workers >= 1)
203-
204-
## Fall back to sequential futures if only a single additional R process
205-
## can be spawned off, i.e. then use the current main R process.
206-
## Sequential futures best reflect how multicore futures handle globals.
207-
if (workers == 1L && !inherits(workers, "AsIs")) {
208-
## AD HOC: Make sure plan(multicore) also produces a warning, if needed
209-
if (default_workers) supportsMulticore(warn = TRUE)
210-
## covr: skip=1
211-
return(SequentialFutureBackend(...))
212-
}
213-
214-
core <- ClusterFutureBackend(workers = workers, ...)
215-
core[["futureClasses"]] <- c("MultisessionFuture", core[["futureClasses"]])
216-
core <- structure(core, class = c("MultisessionFutureBackend", class(core)))
217-
core
218-
}

0 commit comments

Comments
 (0)