
    h\	                        S SK Jr  S SKrS SKJr  S SKJr  S SKJr  SSK	J
r
  SSKJr  \R                  S	:  a	  S S
KJrJr  OS S
KJrJr  \" S5      r\" S5      rSSSS.           SS jjrSS jrg)    )annotationsN)Callable)TypeVar)warn   )get_async_backend)CapacityLimiter)      )TypeVarTupleUnpackT_RetvalPosArgsTF)abandon_on_cancelcancellablelimiterc               v   #    Ub  Un[        S[        SS9  [        5       R                  XXS9I Sh  vN $  N7f)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.

NzThe `cancellable=` keyword argument to `anyio.to_thread.run_sync` is deprecated since AnyIO 4.1.0; use `abandon_on_cancel=` instead   )
stacklevel)r   r   )r   DeprecationWarningr   run_sync_in_worker_thread)funcr   r   r   argss        A/var/www/html/env/lib/python3.13/site-packages/anyio/to_thread.pyrun_syncr      sT     6 'M		
 #$>>&7 ?    s   0979c                 2    [        5       R                  5       $ )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_limiter     r   r   r   =   s     ==??r   )r   z&Callable[[Unpack[PosArgsT]], T_Retval]r   zUnpack[PosArgsT]r   boolr   zbool | Noner   zCapacityLimiter | Nonereturnr   )r!   r	   )
__future__r   syscollections.abcr   typingr   warningsr   _core._eventloopr   abcr	   version_infor   r   typing_extensionsr   r   r   r   r   r   r   <module>r+      s    " 
 $   /  w++6:
# $#&*&
0&& & 	&
 $& &R@r   