
Get the number of workers available
nbrOfWorkers(evaluator = NULL)nbrOfFreeWorkers(evaluator = NULL, background = FALSE, ...)
nbrOfWorkers()
returns a positive number in +Inf
.
nbrOfFreeWorkers()
returns a non-negative number in
nbrOfWorkers()
.
A future evaluator function.
If NULL (default), the current evaluator as returned
by plan()
is used.
If TRUE, only workers that can process a future in the background are considered. If FALSE, also workers running in the main R process are considered, e.g. when using the 'sequential' backend.
Not used; reserved for future use.
plan(multisession)
nbrOfWorkers() ## == availableCores()
plan(sequential)
nbrOfWorkers() ## == 1
Run the code above in your browser using DataLab