+
    i  c                   s\    R	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/R lt	R# )
staggered_raceN)events)
exceptions)locks)tasks)futuresloopc                s  aaaa	a
aaaaaaa"   S;'       g    \         P                  ! 4       o\        P                  ! S4      o\	        V 4      oR oR o. o. o	\        4       oR o
V
VVV3R loR VVV	VVVVVVV3
R lloR p \        P                  ! 4       pSP                  S! VR 4      4      p\        P                  ! VS4       SP                  V4       VP                  S4       VP                  4        R pS'       d    SP                  4       o
 S
G R j  xL
  R o
K'   Te   ThSSS	3>	?>>#  L  \        P                   d0   pTpS F  pTP                   ! TP"                  !   K  	   R p?LUR p?ii ; i  >	?>>i ; i5i)Nc                 s<  < SP                  V 4       \        P                  ! V S4       Se0   SP                  4       '       g   S'       g   SP	                  R 4       V P                  4       '       d   R # V P                  4       pVf   R # SP                  V4       R # N)Zdiscardr   Zfuture_discard_from_awaited_byZdoneZ
set_resultZ	cancelledZ	exceptionappend)taskZexcon_completed_futparent_taskrunning_tasksunhandled_exceptionss   & */usr/lib64/python3.14/asyncio/staggered.py	task_doneZ!staggered_race.<locals>.task_doneL   sy    d#..t[A($))++!''->>nn;##C(    c                s    V ^8  d   QhRR/# )i   ZreturnN )Zformats   "r   Z__annotate__Z$staggered_race.<locals>.__annotate__^   s     7 7D 7r   c                 s  <
"   V P                  4       G R j  xL
  Vec   \        P                  ! \        P                  4      ;_uu_ 4        \
        P                  ! VP                  4       S4      G R j  xL
  R R R 4        \        S4      w  r#\        P                  ! 4       p\        P                  ! 4       pSP                  S! YT4      4      p\        P                  ! TS4       SP                  T4       TP                  S4       TP!                  4        SP#                  R 4        T! 4       G R j  xL
 pToTo\
        P$                  ! S4      pS F  p	YJg   K
  T	P'                  4        K  	  R #  EL` EL  + '       g   i     EL; i  \         d     R # i ; i Ll  \(        \*        3 d    h \,         d!   p
T
ST&   TP!                  4         R p
?
R # R p
?
ii ; i5ir   )Zwait
contextlibZsuppressexceptions_modZTimeoutErrorr   Zwait_forZnextZStopIterationr   Eventcreate_taskr   future_add_to_awaited_byaddadd_done_callbacksetr   current_taskcancelZ
SystemExitZKeyboardInterruptZBaseException)ok_to_startZprevious_failedZ
this_indexZcoro_fnZthis_failedZnext_ok_to_startZ	next_taskZresultr   ZtZedelayenum_coro_fnsr   r   r   run_one_coror   r   winner_indexwinner_results   &&         r   r   Z$staggered_race.<locals>.run_one_coro^   s        &$$^%@%@AA
 nn_%9%9%;UCCC B	"&}"5J kkm ;;=$$\2B%PQ	((K@)$##I. 	$	"9_F &L"M !--d3L"(HHJ #c 	! D BAA  		" %-. 	 	%&Jz"OO	s   G$E74G$)E=5E:6E=:G$F BG$,
F% 6F#7F% ;!G$!G$:E==F		G$F G$F  G$#F% %G! G!GG$G!!G$)r   Zget_running_loopr   r   Z	enumerater   r   r   r   r   r   r   r   Zcreate_futurer   ZCancelledErrorr   ZargsZExceptionGroup)Zcoro_fnsr   r   Zpropagate_cancellation_errorr   Z
first_taskZexr	   r   r   r
   r   r   r   r   r   r    r!   s   &fd     @@@@@@@@@@r   r    r       sx    h ,,6**,D$$T*Kh'MMLJEM) )$7 7 7r $( Xkkm%%l;&EF
(([A*%$$Y/'+$#113*&&&
  $ (3..lJ646JK '!00 */1,)DKK) ** 46JKsa   A2FA?E9 E9 D2 D0D2 E9 +F0D2 2E6%E1,E9 1E66E9 9E??F)r    )
Z__all__r   Z r   r   r   r   r   r   r    r   r   r   <module>r"      s.       *   eX$ eXr   