+
    P\i0  c                  s&  a  0 t $ ^ RIHt ^ RIt^ RIt^ RIt^ RIHtHtH	t	 ^ RI
Ht ^ RIHt ^ RIHt ^ RIHtHtHt ^RIHt ]P,                  R.8  d
   ^ R	IHtHt M^ R	IHtHt R
]R&    ^ RIt]'       d   ^RIHt R/t]! R4      t ]! R4      t!]PD                  ! 4       t#/ t$R]R&   RRRR/R R llt%R R lt&R R lt'R R lt(R R lt)R R lt*R  R! lt+R" R# lt,]R$ R% l4       t-R0R& R' llt.R( R) lt/R* R+ lt0R, R- lt1R#   ] d    Rt Li ; i)1i    )annotationsN)	AwaitableCallable	Generator)contextmanager)Token)import_module)TYPE_CHECKINGAnyTypeVar)NoEventLoopError)TypeVarTupleUnpackr   sniffio)AsyncBackendasyncioT_RetvalPosArgsTzdict[str, type[AsyncBackend]]loaded_backendsbackendbackend_optionsc          
     s,    V ^8  d   QhRRRRRRRRR	R
/# )   funcz1Callable[[Unpack[PosArgsT]], Awaitable[T_Retval]]argszUnpack[PosArgsT]r   Zstrr   zdict[str, Any] | Nonereturnr    Zformat   ";/usr/lib/python3.14/site-packages/anyio/_core/_eventloop.py__annotate__r   &   s:     )+ )+
;)+)+ )+ +	)+
 )+    c               s8   \        4       ;p'       d   \        RV R24      h \        V4      pRpTf   \        T4      p T;'       g    / pTP                  Y/ T4      \        T4       #   \         d   p\	        RT 24      ThRp?ii ; i  \        T4       i ; i)u  
Run the given coroutine function in an asynchronous event loop.

The current thread must not be already running an event loop.

:param func: a coroutine function
:param args: positional arguments to ``func``
:param backend: name of the asynchronous event loop implementation – currently
    either ``asyncio`` or ``trio``
:param backend_options: keyword arguments to call the backend ``run()``
    implementation with (documented :ref:`here <backend options>`)
:return: the return value of the coroutine function
:raises RuntimeError: if an asynchronous event loop is already running in this
    thread
:raises LookupError: if the named backend is not found

zAlready running z in this threadzNo such backend: N)current_async_libraryRuntimeErrorget_async_backendImportErrorZLookupErrorset_current_async_libraryrunreset_current_async_library)r   r   r   r   asynclib_nameZasync_backendZexctokens   &$$*    r   r$   r$   &   s    . .//}/-m_OLMMB)'2 E *'2+)//R  RA#E*  B-gY78cAB 	$E*s)   A*  B 	B *B	5BB	Bc                    V ^8  d   QhRRRR/# )r   delayfloatr   Noner   r   r   r   r   r   R   s     2 2u 2 2r   c                sP   "   \        4       P                  V 4      G Rj  xL
 #  L5i)z]
Pause the current task for the specified duration.

:param delay: the duration, in seconds

N)r!   sleep)r)      &r   r,   r,   R   s!      #$**51111s   &$&c                   V ^8  d   QhRR/# )r   r   r+   r   r   r   r   r   r   \   s     	 	T 	r   c                 sT   "   \        \        P                  4      G Rj  xL
  R#  L5i)zs
Pause the current task until it's cancelled.

This is a shortcut for ``sleep(math.inf)``.

.. versionadded:: 3.1

N)r,   mathZinfr   r   r   sleep_foreverr0   \   s      /s   (&(c               r(   )r   deadliner*   r   r+   r   r   r   r   r   r   h   s     ( ( ($ (r   c                sl   "   \        4       p\        \        W,
          ^ 4      4      G Rj  xL
  R#  L5i)z
Pause the current task until the given time.

:param deadline: the absolute time to wake up at (according to the internal
    monotonic clock of the event loop)

.. versionadded:: 3.1

N)current_timer,   Zmax)r1   Znow   & r   sleep_untilr4   h   s%      .C
HNA&
'''s   )424c               r.   )r   r   r*   r   r   r   r   r   r   v   s     	. 	.e 	.r   c                 2    \        4       P                  4       # )z
Return the current value of the event loop's internal clock.

:return: the clock value (seconds)
:raises NoEventLoopError: if no supported asynchronous event loop is running in the
    current thread

)r!   r2   r   r   r   r2   r2   v   s     ++--r   c               r.   r   r   ztuple[str, ...]r   r   r   r   r   r      s      / r   c                 s    \         # )z5Return a tuple of the names of all built-in backends.)BACKENDSr   r   r   get_all_backendsr8      s    Or   c               r.   r6   r   r   r   r   r   r      s     % % %r   c                 s    . p \        4        F   p \        V4       T P                  T4       K"  	  \	        V 4      #   \         d     K=  i ; i)z
Test for the availability of built-in backends.

:return a tuple of the built-in backend names that were successfully imported

.. versionadded:: 4.12

)r8   r!   r"   ZappendZtuple)Zavailable_backendsZbackend_names     r   get_available_backendsr9      sV     %'(*	l+ 	!!,/ + #$$  		s   <A
Ac               r.   )r   r   ztype[BaseException]r   r   r   r   r   r      s     ; ;!4 ;r   c                 r5   )z
Return the current async library's cancellation exception class.

:raises NoEventLoopError: if no supported asynchronous event loop is running in the
    current thread

)r!   Zcancelled_exception_classr   r   r   get_cancelled_exc_classr:      s     88::r   c               s$    V ^8  d   QhRRRRRR/# )r   backend_classtype[AsyncBackend]r'   Zobjectr   zGenerator[Any, None, None]r   r   r   r   r   r      s$     	' 	'%	'.4	'	'r   c              #  sh   "   ^RI Hp V! W4      \        n         Rx  \        =R#   \        =i ; i5i)r   )EventLoopTokenN)Zlowlevelr=   threadlocalsZcurrent_token)r;   r'   r=   s   && r   claim_worker_threadr?      s+      *!/!EL'&L&s   2' 2/2c               r(   )r   r&   
str | Noner   r<   r   r   r   r   r   r      s     $ $Z $;M $r   c                s   V f8   \        4       p V '       g&   \        RRP                  \        4       4       24      h \        V ,          #   \
         d1    \        RT  24      pTP                  \        T &   TP                  u # i ; i)NzPNot currently running on any asynchronous event loop. Available async backends: z, zanyio._backends._)r   r
   Zjoinr8   r   ZKeyErrorr   r;   )r&   Zmoduler3   r   r!   r!      s    -/"--1YY7G7I-J,KM $}-- $!2=/BC)/)=)=&###$s   A
 
8BBc               r.   )r   r   r@   r   r   r   r   r   r      s      z r   c                 s    \         f   ^ R Ip  V P                  4        R#  \         P                  ! 4       #   \         d     R # i ; i  \         P
                   d     R # i ; i)Nr   )r   r   Zget_running_loopr    r   ZAsyncLibraryNotFoundError)r   s    r   r   r      sg    	$$&	0022	  	 	
 00 		s    6 A AAA! A!c               r(   )r   r&   r@   r   Token | Noner   r   r   r   r   r      s     A AZ AL Ar   c                sT    \         f   R # \         P                  P                  V 4      # N)r   current_async_library_cvarZset)r&   r-   r   r#   r#      s!    --11-@@r   c               r(   )r   r'   rA   r   r+   r   r   r   r   r   r      s     8 8| 8 8r   c                sP    V e"   \         P                  P                  V 4       R # R # rB   )r   rC   Zreset)r'   r-   r   r%   r%      s!    **007 r   )i   i   )r   ZtriorB   )2__conditional_annotations__Z
__future__r    r/   ZsysZ	threadingZcollections.abcr   r   r   Z
contextlibr   Zcontextvarsr   Z	importlibr   Ztypingr   r   r	   Z_exceptionsr
   Zversion_infor   r   Ztyping_extensionsZ__annotations__r   ZModuleNotFoundErrorZabcr   r7   r   r   Zlocalr>   r   r$   r,   r0   r4   r2   r8   r9   r:   r?   r!   r   r#   r%   )rD   s   @r   <module>rE      s   " "  
  : : %  # . . )w++6	 " :
# 13. 3)+ )+ .2	)+X2	(	.
%*;  	' 	'$(&A8e  Gs   +D 	DD