Spec-Zone.ru › Polars

polars.thread_pool_size

polars.thread_pool_size() → int

Return the number of threads in the Polars thread pool.

Notes

The thread pool size can be overridden by setting the POLARS_MAX_THREADS environment variable before process start. The thread pool is not behind a lock, so it cannot be modified once set. A reasonable use case for this might be temporarily limiting the number of threads before importing Polars in a PySpark UDF or similar context. Otherwise, it is strongly recommended not to override this value as it will be set automatically by the engine.

Examples

>>> pl.thread_pool_size()  
16

© 2020 Ritchie Vink
© 2022 Polars contributors
Licensed under the MIT License.
https://docs.pola.rs/api/python/stable/reference/api/polars.thread_pool_size.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API