50% off | Unlimited Data & AI Learning
Get 50% off unlimited learning

future (version 1.18.0)

nbrOfWorkers: Get the number of workers available

Description

Get the number of workers available

Usage

nbrOfWorkers(evaluator = NULL)

Arguments

evaluator

A future evaluator function. If NULL (default), the current evaluator as returned by plan() is used.

Value

A positive number in 1,2,3,.... Note, it may also be +Inf for certain types of backends.

Examples

Run this code
# NOT RUN {
plan(multisession)
nbrOfWorkers()  ## == availableCores()

plan(sequential)
nbrOfWorkers()  ## == 1
# }

Run the code above in your browser using DataLab