Team Ai
Datasetpublic

codekingpro/portable-devtools

sourceHugging Faceupdated 5mo agoView on Hugging Face
1likes14kdownloads
to_thread.cpython-313.pyc45 linesDownload Raw Back to __pycache__
1�

2�j�3����SSKJr SrSSKrSSKJr SSKJr SSKJ	r	 SSK4Jr SS	KJ
r
 \RS5:�a	SSKJrJr OSSKJrJr \"S5r\"S
5rSSSS.SSjjrSSjrg)�)�annotations)�run_sync�current_default_thread_limiterN)�Callable)�TypeVar)�warn�)�get_async_backend)�CapacityLimiter)��)�TypeVarTuple�Unpack�T_Retval�PosArgsTF)�abandon_on_cancel�cancellable�limiterc��v# �UbUn[S[SS9 [5RXXS9IShv�N$N7f)a6Call the given function with the given arguments in a worker thread.7 8If the ``abandon_on_cancel`` option is enabled and the task waiting for its9completion is cancelled, the thread will still run its course but its10return value (or any raised exception) will be ignored.11 12:param func: a callable13:param args: positional arguments for the callable14:param abandon_on_cancel: ``True`` to abandon the thread (leaving it to run15    unchecked on own) if the host task is cancelled, ``False`` to ignore16    cancellations in the host task until the operation has completed in the worker17    thread18:param cancellable: deprecated alias of ``abandon_on_cancel``; will override19    ``abandon_on_cancel`` if both parameters are passed20:param limiter: capacity limiter to use to limit the total amount of threads running21    (if omitted, the default limiter is used)22:raises NoEventLoopError: if no supported asynchronous event loop is running in the23    current thread24:return: an awaitable that yields the return value of the function.25 26Nz�The `cancellable=` keyword argument to `anyio.to_thread.run_sync` is deprecated since AnyIO 4.1.0; use `abandon_on_cancel=` instead�)�27stacklevel)rr)r�DeprecationWarningr28�run_sync_in_worker_thread)�funcrrr�argss     �UD:\code\apps\devtools\python\user_packages\Python313\site-packages\anyio/to_thread.pyrrsT���:��'���
M���		29�#�$�>�>��&7�?�����s�09�7�9c�2�[5R5$)z�30Return the capacity limiter that is used by default to limit the number of31concurrent threads.32 33:return: a capacity limiter object34:raises NoEventLoopError: if no supported asynchronous event loop is running in the35    current thread36 37)r38r��rrrDs����=�=�?�?r)rz&Callable[[Unpack[PosArgsT]], T_Retval]rzUnpack[PosArgsT]r�boolrzbool | NonerzCapacityLimiter | None�returnr)r!r)�39__future__r�__all__�sys�collections.abcr�typingr�warningsr�_core._eventloopr40�abcr�version_inforr�typing_extensionsrrrrrrr�<module>r,s���"���41�$���/� ����w��+�+�6��:����42�#��$�#�&*�(�430�(��(��(��	(�44$�(��
(�V45@r
codekingpro/portable-devtools · Team Ai