o
    ¹­§i¹  ã                   @  s²   d dl mZ d dlZd dlmZ e e¡ d dlmZ	 W d  ƒ n1 s&w   Y  d dl
mZ erId dlZejdkrCd dlmZ nd dlmZ ddd	„Zed
ƒddd„ƒZdS )é    )ÚannotationsN)Ú
deprecated)ÚTYPE_CHECKING)é   é   ÚreturnÚintc                   C  s   t  ¡ S )a  
    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()  # doctest: +SKIP
    16
    )ÚplrÚthread_pool_size© r   r   úN/home/app/Keep/.python/lib/python3.10/site-packages/polars/meta/thread_pool.pyr
      s   r
   z>`threadpool_size` was renamed; use `thread_pool_size` instead.c                   C  s   t ƒ S )z¡
    Return the number of threads in the Polars thread pool.

    .. deprecated:: 0.20.7
        This function has been renamed to :func:`thread_pool_size`.
    )r
   r   r   r   r   Úthreadpool_size*   s   r   )r   r   )Ú
__future__r   Ú
contextlibZpolars._utils.deprecationr   ÚsuppressÚImportErrorZpolars._plrZ_plrr	   Útypingr   ÚsysÚversion_infoÚwarningsZtyping_extensionsr
   r   r   r   r   r   Ú<module>   s    ÿ

