get_n_workers: Get Current Number of Parallel Workers

View source: R/parallel_config.R

get_n_workersR Documentation

Get Current Number of Parallel Workers

Description

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

Usage

get_n_workers()

Value

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

See Also

set_parallel_plan()

Examples

## Not run: 
set_parallel_plan("multisession", workers = 4)
get_n_workers()  # Returns 4

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

## End(Not run)


riemtan documentation built on Nov. 11, 2025, 1:06 a.m.