Dynamically configures the Rayon thread pool budget in the native Rust backend. If n is omitted or NULL, the thread count is automatically determined via detect_hpc_cores().

set_hpc_threads(n = NULL)

Arguments

n

integer number of worker threads (must be >= 1). If NULL (the default), automatically detects the allocated core quota.

Value

An integer representing the newly configured thread count (invisibly).

Examples

if (FALSE) { # \dontrun{
  set_hpc_threads(4)
  get_hpc_threads()
} # }