Learn R Programming

riemtan (version 0.2.5)

get_n_workers: Get Current Number of Parallel Workers

Description

Returns the number of parallel workers configured in the current future plan.

Usage

get_n_workers()

Arguments

Value

Integer specifying the number of workers, or 1 if sequential processing is enabled.

See Also

set_parallel_plan()

Examples

Run this code
if (FALSE) {
set_parallel_plan("multisession", workers = 4)
get_n_workers()  # Returns 4

set_parallel_plan("sequential")
get_n_workers()  # Returns 1
}

Run the code above in your browser using DataLab