HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //usr/local/lib/python3.10/dist-packages/anyio/__pycache__/to_thread.cpython-310.pyc
o

���g\	�@s�ddlmZddlZddlmZddlmZddlmZddl	m
Z
ddlmZej
d	kr6dd
lmZmZndd
lmZmZed�Zed�Zd
ddd�ddd�Zd dd�ZdS)!�)�annotationsN)�Callable)�TypeVar)�warn�)�get_async_backend)�CapacityLimiter)��)�TypeVarTuple�Unpack�T_Retval�PosArgsTF)�abandon_on_cancel�cancellable�limiter�func�&Callable[[Unpack[PosArgsT]], T_Retval]�args�Unpack[PosArgsT]r�boolr�bool | Noner�CapacityLimiter | None�returnc�s6�|dur|}tdtdd�t�j||||d�IdHS)a�
    Call the given function with the given arguments in a worker thread.

    If the ``cancellable`` option is enabled and the task waiting for its completion is
    cancelled, the thread will still run its course but its return value (or any raised
    exception) will be ignored.

    :param func: a callable
    :param args: positional arguments for the callable
    :param abandon_on_cancel: ``True`` to abandon the thread (leaving it to run
        unchecked on own) if the host task is cancelled, ``False`` to ignore
        cancellations in the host task until the operation has completed in the worker
        thread
    :param cancellable: deprecated alias of ``abandon_on_cancel``; will override
        ``abandon_on_cancel`` if both parameters are passed
    :param limiter: capacity limiter to use to limit the total amount of threads running
        (if omitted, the default limiter is used)
    :return: an awaitable that yields the return value of the function.

    Nz�The `cancellable=` keyword argument to `anyio.to_thread.run_sync` is deprecated since AnyIO 4.1.0; use `abandon_on_cancel=` instead�)�
stacklevel)rr)r�DeprecationWarningr�run_sync_in_worker_thread)rrrrr�r�:/usr/local/lib/python3.10/dist-packages/anyio/to_thread.py�run_syncs���r rcCs
t���S)z�
    Return the capacity limiter that is used by default to limit the number of
    concurrent threads.

    :return: a capacity limiter object

    )r�current_default_thread_limiterrrrrr!=s
r!)rrrrrrrrrrrr
)rr)�
__future__r�sys�collections.abcr�typingr�warningsr�_core._eventloopr�abcr�version_inforr�typing_extensionsr
rr r!rrrr�<module>s"
�)