+
    i?  c                   s    Rt ^ RIt^ RIt^ RIt^ RIt^ RIt^ RIt^RIHt ^RIH	t	 ^RIH
t
 ^RIHt ^RIHt  ! R R]P                  4      t ! R	 R 4      tR
RRR/R ltR tR# )RunnerN)
coroutines)events)
exceptions)tasks)	constantsc                   s"    ] tR t^tRtRtRtRtR# )_StateZcreatedZinitializedZclosed N)__name__
__module____qualname____firstlineno__CREATEDINITIALIZEDCLOSED__static_attributes__r       (/usr/lib64/python3.14/asyncio/runners.pyr   r      s    GKFr   r   c                   sd   a  ] tR t^t o RRRR/R ltR tR tR tR tR	R/R
 lt	R t
R tRtV tR# )r    debugNloop_factoryc               s    \         P                  V n        Wn        W n        R V n        R V n        ^ V n        RV n        R # )NF)	r   r   _state_debug_loop_factory_loop_context_interrupt_count_set_event_loop)selfr   r   s   &$$r   __init__ZRunner.__init__1   s6    nn)
 !$r   c                s&    V P                  4        V # N)
_lazy_initr      &r   	__enter__ZRunner.__enter__:   s    r   c                s&    V P                  4        R # r   )close)r   Zexc_typeZexc_valZexc_tb   &&&&r   __exit__ZRunner.__exit__>   s    

r   c                sj   V P                   \        P                  Jd   R #  V P                  p\	        V4       VP                  VP                  4       4       VP                  VP                  \        P                  4      4       V P                  '       d   \        P                  ! R 4       VP                  4        R V n        \        P                  V n         R #   T P                  '       d   \        P                  ! R 4       XP                  4        R T n        \        P                  T n         i ; ir   )r   r   r   r   _cancel_all_tasksrun_until_completeZshutdown_asyncgensZshutdown_default_executorr   ZTHREAD_JOIN_TIMEOUTr   r   set_event_loopr"   r   )r   loops   & r   r"   ZRunner.closeA   s    ;;f000	(::Dd###D$;$;$=>##..y/L/LMO ###%%d+JJLDJ --DK	 ###%%d+JJLDJ --DKs   A$C AD2c                s:    V P                  4        V P                  # r   )r   r   r   r    r   get_loopZRunner.get_loopR   s    zzr   contextc               sT   \         P                  ! 4       e   \        R4      hV P                  4        \        P
                  ! V4      '       g4   \        P                  ! V4      '       d   R pV! V4      pM\        R4      hVf   V P                  pV P                  P                  WR7      p\        P                  ! 4       \        P                  ! 4       J d   \        P                   ! \        P"                  4      \        P$                  J dJ   \&        P(                  ! V P*                  VR7      p \        P                  ! \        P"                  V4       MR p^ V n         V P                  P1                  V4      Ve^   \        P                   ! \        P"                  4      VJ d5   \        P                  ! \        P"                  \        P$                  4       # # #   \,         d    R p Li ; i  \2        P4                   d;    T P.                  ^ 8  d(   \7        TRR 4      pTe   T! 4       ^ 8X  d   \9        4       hh i ; i  Te^   \        P                   ! \        P"                  4      TJ d5   \        P                  ! \        P"                  \        P$                  4       i i i ; i)Nz7Runner.run() cannot be called from a running event loopc                 s"   "   V G R j  xL
 #  L5ir   r   )Z	awaitabler    r   _wrap_awaitableZ#Runner.run.<locals>._wrap_awaitableb   s     !*?*?s   z:An asyncio.Future, a coroutine or an awaitable is required)r*   )	main_taskuncancel)r   _get_running_loopRuntimeErrorr   r   ZiscoroutineinspectZisawaitableZ	TypeErrorr   r   Zcreate_task	threadingZcurrent_threadZmain_threadsignalZ	getsignalZSIGINTZdefault_int_handler	functoolsZpartial
_on_sigintZ
ValueErrorr   r&   r   ZCancelledErrorZgetattrKeyboardInterrupt)r   Zcoror*   r+   taskZsigint_handlerr-   s   &&$    r   runZ
Runner.runW   s   ##%1IK K 	%%d++""4((+ 't, !8 9 9 ?mmGzz%%d%<$$&)*?*?*AA  /63M3MM&..t$ON&fmm^< "N !	I::006 *$$V]]3~EfmmV-G-GH F +%  & "&	& (( 	$$q("4T:'HJ!O+--	 *$$V]]3~EfmmV-G-GH F +s,   3%G #G2 G/.G/2AII A#J'c                sJ   V P                   \        P                  J d   \        R 4      hV P                   \        P                  J d   R# V P
                  fU   \        P                  ! 4       V n        V P                  '       g(   \        P                  ! V P                  4       RV n	        MV P                  4       V n        V P                  e&   V P                  P                  V P                  4       \        P                  ! 4       V n        \        P                  V n         R# )zRunner is closedNT)r   r   r   r/   r   r   r   Znew_event_loopr   r   r'   r   Z	set_debugcontextvarsZcopy_contextr   r   r    r   r   ZRunner._lazy_init   s    ;;&--'122;;&,,,%..0DJ''' %%djj1'+$++-DJ;;"JJ  -#002((r   c                s    V ;P                   ^,          un         V P                   ^8X  dE   VP                  4       '       g/   VP                  4        V P                  P	                  R 4       R# \        4       h)i   c                  s    R # r   r   r   r   r   Z<lambda>Z#Runner._on_sigint.<locals>.<lambda>   s    Dr   N)r   Zdonecancelr   Zcall_soon_threadsafer5   )r   ZsignumZframer,   r#   r   r4   ZRunner._on_sigint   sW    "  A%inn.>.>JJ++L9!!r   )r   r   r   r   r   r   r   )r   r	   r
   r   r   r!   r$   r"   r)   r7   r   r4   r   Z__classdictcell__)Z__classdict__s   @r   r    r       sJ     8% %4 %("
3I4 3Ij)&" "r   r   r   c                s    \         P                  ! 4       e   \        R4      h\        WR7      ;_uu_ 4       pVP	                  V 4      uuR R R 4       #   + '       g   i     R # ; i)Nz8asyncio.run() cannot be called from a running event loop)r   r   )r   r.   r/   r    r7   )Zmainr   r   Zrunners   &$$ r   r7   r7      sO    : !-FH 	H 
e	7	76zz$ 
8	7	7	7s   AA$	c           	      sv   \         P                  ! V 4      pV'       g   R # V F  pVP                  4        K  	  V P                  \         P                  ! VRR/ 4       V FT  pVP                  4       '       d   K  VP                  4       f   K/  V P                  RRRVP                  4       RV/4       KV  	  R # )NZreturn_exceptionsTZmessagez1unhandled exception during asyncio.run() shutdown	exceptionr6   )r   Z	all_tasksr9   r&   ZgatherZ	cancelledr:   Zcall_exception_handler)r(   Z	to_cancelr6   s   &  r   r%   r%      s    %I  	ELL)LtLM>>>>'''NT^^-) 	 r   )r    r7   )Z__all__r8   Zenumr3   r0   r1   r2   Z r   r   r   r   r   ZEnumr   r    r7   r%   r   r   r   <module>r;      sa   
           TYY Q" Q"h# t # $ # Lr   