
    RPf
                       d dl mZ d dlZd dlmZmZ d dlmZmZ d dl	m
Z
 d dlmZmZmZmZmZ ej"                  dk\  r	d dlmZmZ nd dlmZmZ erd	d
lmZ  ed      Z edd      Z ed      Z G d dee         Z G d de      Zy)    )annotationsN)ABCMetaabstractmethod)	AwaitableCallable)TracebackType)TYPE_CHECKINGAnyProtocolTypeVaroverload)      )TypeVarTupleUnpack   )CancelScopeT_RetvalT_contraT)contravariantPosArgsTc                  :    e Zd Zedd       Zedd       ZdddZy)	
TaskStatusc                     y N selfs    J/var/www/fastapitest/venv/lib/python3.12/site-packages/anyio/abc/_tasks.pystartedzTaskStatus.started           c                     y r   r   r   values     r   r    zTaskStatus.started   r!   r"   Nc                     y)zx
        Signal that the task has started.

        :param value: object passed back to the starter of the task
        Nr   r$   s     r   r    zTaskStatus.started       r"   )r   zTaskStatus[None]returnNone)r%   r   r(   r)   r   )r%   zT_contra | Noner(   r)   )__name__
__module____qualname__r   r    r   r"   r   r   r      s-       r"   r   c                      e Zd ZU dZded<   edd	 	 	 	 	 	 	 d
d       Zedd	 	 	 	 	 	 	 dd       Zedd       Ze	 	 	 	 	 	 	 	 dd	       Z	y)	TaskGroupz
    Groups several asynchronous tasks together.

    :ivar cancel_scope: the cancel scope inherited by all child tasks
    :vartype cancel_scope: CancelScope
    r   cancel_scopeN)namec                    y)a  
        Start a new task in this task group.

        :param func: a coroutine function
        :param args: positional arguments to call the function with
        :param name: name of the task, for the purposes of introspection and debugging

        .. versionadded:: 3.0
        Nr   r   funcr0   argss       r   
start_soonzTaskGroup.start_soon1   r'   r"   c                  K   yw)a  
        Start a new task and wait until it signals for readiness.

        :param func: a coroutine function
        :param args: positional arguments to call the function with
        :param name: name of the task, for the purposes of introspection and debugging
        :return: the value passed to ``task_status.started()``
        :raises RuntimeError: if the task finishes without calling
            ``task_status.started()``

        .. versionadded:: 3.0
        Nr   r2   s       r   startzTaskGroup.startB           c                   K   yw)z:Enter the task group context and allow starting new tasks.Nr   r   s    r   
__aenter__zTaskGroup.__aenter__V   r8   r9   c                   K   yw)z<Exit the task group context waiting for all tasks to finish.Nr   )r   exc_typeexc_valexc_tbs       r   	__aexit__zTaskGroup.__aexit__Z   r8   r9   )r3   z,Callable[[Unpack[PosArgsT]], Awaitable[Any]]r4   zUnpack[PosArgsT]r0   objectr(   r)   )r3   zCallable[..., Awaitable[Any]]r4   rA   r0   rA   r(   r
   )r(   r.   )r=   ztype[BaseException] | Noner>   zBaseException | Noner?   zTracebackType | Noner(   zbool | None)
r*   r+   r,   __doc____annotations__r   r5   r7   r;   r@   r   r"   r   r.   r.   '   s     
 	:   	
 
   
 	+  	
 
 & I I K,K &K %	K
 
K Kr"   r.   )	metaclass)
__future__r   sysabcr   r   collections.abcr   r   typesr   typingr	   r
   r   r   r   version_infor   r   typing_extensions_core._tasksr   r   r   r   r   r.   r   r"   r   <module>rN      sv    " 
 ' /  B Bw++6*::T2
#(# ":K' :Kr"   