A batchtools backend that resolves futures sequentially in transient background R sessions
Source:R/batchtools_local.R
batchtools_local.Rd
The batchtools local backend is useful for verifying parts of your batchtools setup locally, before using a more advanced backend such as the job-scheduler backends.
Details
Batchtools local futures use batchtools cluster functions
created by batchtools::makeClusterFunctionsInteractive()
with
external = TRUE
.
An alternative to the batchtools interactive backend is to use
plan(future::cluster, workers = I(1))
.
Examples
plan(batchtools_local)
message("Main process ID: ", Sys.getpid())
#> Main process ID: 258939
f <- future(Sys.getpid())
pid <- value(f)
message("Worker process ID: ", pid)
#> Worker process ID: 259240