Gets the number of workers available
nbrOfWorkers(evaluator = NULL)
A future evaluator function.
If NULL (default), the current evaluator as returned
by plan()
is used.
A number in [1, Inf].
# NOT RUN {
plan(multiprocess)
nbrOfWorkers() ## == availableCores()
plan(multiprocess, workers = 2)
nbrOfWorkers() ## == 2
plan(sequential)
nbrOfWorkers() ## == 1
# }
Run the code above in your browser using DataLab