Skip to content

Return the number of threads in the Polars thread pool

Description

Return the number of threads in the Polars thread pool

Usage

pl$thread_pool_size()

Details

The threadpool size can be overridden by setting the POLARS_MAX_THREADS environment variable before process start. It cannot be modified once the package is loaded. It is strongly recommended not to override this value as it will be set automatically by the engine.

Value

The integer of threads used by polars engine.

See Also

  • polars_info() shows the thread pool size and other information.

Examples

library("polars")

pl$thread_pool_size()
#> [1] 4