o �J�h��@s�ddlmZddlZddlZddlZddlmZmZmZm Z ddl m Z m Z ddl Zejdkr6ddl mZnddlmZed�Ze d�Zd d d�Zd!dd�ZGdd�de�Zd"dd�Zd#dd�ZdS)$�)� annotationsN)� AsyncIterator� Coroutine�Iterable�Iterator)�Callable�TypeVar)�� )� ParamSpec�P�T�args�tuple[Callable, dict]�return�Nonec �s��t�dt�t��4IdH�'�d�fdd� }|D]\}}��|tj|fi|���qWd�IdHdS1IdHs<wYdS) NzOrun_until_first_complete is deprecated and will be removed in a future version.�func�Callable[[], Coroutine]rrc�s�|�IdH�j��dS�N)� cancel_scope�cancel)r�� task_group��SC:\pinokio\api\whisper-webui.git\app\env\lib\site-packages\starlette\concurrency.py�runs� z%run_until_first_complete.<locals>.run)rrrr)�warnings�warn�DeprecationWarning�anyio�create_task_group� start_soon� functools�partial)rrr�kwargsrrr�run_until_first_completes�� �.�r%r�Callable[P, T]�P.argsr$�P.kwargsc�s,�tj|g|�Ri|��}tj�|�IdHSr)r"r#r� to_thread�run_sync)rrr$rrr�run_in_threadpool$s�r+c@s eZdZdS)�_StopIterationN)�__name__� __module__� __qualname__rrrrr,)sr,�iterator� Iterator[T]cCszt|�WStyt�wr)�next� StopIterationr,)r0rrr�_next-s   �r4� Iterable[T]�AsyncIterator[T]cCs>�t|�} z tj�t|�IdHVWn tyYdSwqr)�iterrr)r*r4r,)r0Z as_iteratorrrr�iterate_in_threadpool7s� ��r8)rrrr)rr&rr'r$r(rr )r0r1rr )r0r5rr6)� __future__rr"�sysr�collections.abcrrrr�typingrrZanyio.to_threadr� version_infor �typing_extensionsr r r%r+� Exceptionr,r4r8rrrr�<module>s"      
Memory