Ë c‡½j¥ãóP—dZdZddlZddlmZddlmZddlmZddlmZdd œd „Z y) zFSupport for running coroutines in parallel with staggered start times.)Ústaggered_raceéNé)Úevents)Ú exceptions)Úlocks)Útasks)Úloopc ƒóއ‡‡‡ ‡ ‡ ‡ ‡ ‡‡‡K—‰xstj«Št|«ŠdŠdŠgŠgŠ t«Š dŠ ˆ ˆ ˆfd„Š dˆˆˆ ˆˆ ˆ ˆ ˆˆf d„ Š d} t j «}‰j ‰ |d««}‰ j|«|j‰ «|j«d}‰ r ‰j«Š ‰ ƒd{–—†dŠ ‰ rŒ ‰r td‰«‚|�|‚‰‰‰ f‹ ~‹S7Œ##tj$r,}|}‰ D]}|j|jŽŒYd}~Œ[d}~wwxYw#‹ ~‹wxYw­w)aùRun coroutines with staggered start times and take the first to finish. This method takes an iterable of coroutine functions. The first one is started immediately. From then on, whenever the immediately preceding one fails (raises an exception), or when *delay* seconds has passed, the next coroutine is started. This continues until one of the coroutines complete successfully, in which case all others are cancelled, or until all coroutines fail. The coroutines provided should be well-behaved in the following way: * They should only ``return`` if completed successfully. * They should always raise an exception if they did not complete successfully. In particular, if they handle cancellation, they should probably reraise, like this:: try: # do work except asyncio.CancelledError: # undo partially completed work raise Args: coro_fns: an iterable of coroutine functions, i.e. callables that return a coroutine object when called. Use ``functools.partial`` or lambdas to pass arguments. delay: amount of time, in seconds, between starting coroutines. If ``None``, the coroutines will run sequentially. loop: the event loop to use. Returns: tuple *(winner_result, winner_index, exceptions)* where - *winner_result*: the result of the winning coroutine, or ``None`` if no coroutines won. - *winner_index*: the index of the winning coroutine in ``coro_fns``, or ``None`` if no coroutines won. If the winning coroutine may return None on success, *winner_index* can be used to definitively determine whether any coroutine won. - *exceptions*: list of exceptions returned by the coroutines. ``len(exceptions)`` is equal to the number of coroutines actually started, and the order is the same as in ``coro_fns``. The winning coroutine's entry is ``None``. NcóÜ•—‰j|«‰�#‰j«s‰s‰jd«|j«ry|j «}|€y‰j |«y)N)ÚdiscardÚdoneÚ set_resultÚ cancelledÚ exceptionÚappend)ÚtaskÚexcÚon_completed_futÚ running_tasksÚunhandled_exceptionss €€€ú*/usr/lib64/python3.12/asyncio/staggered.pyÚ task_donez!staggered_race..task_doneJscø€Ø×јdÔ#à Ð (Ø$×)Ñ)Ô+Ù!à × 'Ñ '¨Ô -à �>‰>Ô Ø à�n‰nÓˆØ ˆ;Ø Ø×#Ñ# CÕ(óc“ó†• K—|j«ƒd{–—†|�Xtjtj«5t j |j«‰ «ƒd{–—†ddd« t‰ «\}}tj«}tj«}‰j‰||««}‰j|«|j‰«|j«‰ jd«t!‰ «|dzk(sJ‚ |«ƒd{–—†}‰�J‚|Š|Št j"‰«}‰D]} | |usŒ| j%«Œy7�ŒN7Œþ#1swYŒýxYw#t$rYywxYw7Œ^#t&t(f$r‚t*$r} | ‰ |<|j«Yd} ~ yd} ~ wwxYw­w)Nr)ÚwaitÚ contextlibÚsuppressÚexceptions_modÚ TimeoutErrorrÚwait_forÚnextÚ StopIterationrÚEventÚ create_taskÚaddÚadd_done_callbackÚsetrÚlenÚ current_taskÚcancelÚ SystemExitÚKeyboardInterruptÚ BaseException)Ú ok_to_startÚprevious_failedÚ this_indexÚcoro_fnÚ this_failedÚnext_ok_to_startÚ next_taskÚresultr)ÚtÚeÚdelayÚ enum_coro_fnsrr Ú run_one_cororrÚ winner_indexÚ winner_results €€€€€€€€€rr:z$staggered_race..run_one_coro[s§øèø€ð×ÑÓ × Ð à Ð &Ü×$Ñ$¤^×%@Ñ%@ÕAô —n‘n _×%9Ñ%9Ó%;¸UÓC×CÐC÷ Bð Ü"& }Ó"5Ñ ˆJ˜ô—k‘k“mˆ Ü Ÿ;™;›=ÐØ×$Ñ$¡\Ð2BÀKÓ%PÓQˆ Ø×ј)Ô$Ø×#Ñ# IÔ.ð ×ÑÔà×ј$ÔÜ�:‹ *¨q¡.Ò0Ð0Ð0ð Ù"›9—_ˆFð Ð'Ð 'Ð'Ø%ˆLØ"ˆMô!×-Ñ-¨dÓ3ˆLÛ"�ؘLÒ(Ø—H‘H•Jñ#ða !ùðDø÷ BÐAûôò Ù ð úð %ùÜÔ-Ð.ò Ø Üò Ø%&ˆJ�zÑ "Ø �O‰O× Ñ ûð üs ƒG—E%˜)GÁ(E*Á)E(Á*E*Á.GÁ7E6ÂBGÄ FÄ&FÄ'FÄ+&GÅGÅ(E*Å*E3Å/GÅ6 FÅ?GÆFÆGÆFÆF>ÆF9Æ4GÆ9F>Æ>Gzstaggered race failed)ÚreturnN)rÚget_running_loopÚ enumerater'rr#r$r%r&Ú create_futurerÚCancelledErrorr*ÚargsÚExceptionGroup)Úcoro_fnsr8r Úpropagate_cancellation_errorr.Ú first_taskÚexrr9rrr:rrrr;r<s `` @@@@@@@@@rrr s`ÿúèø€ðh Ò ,”6×*Ñ*Ó,€DܘhÓ'€MØ€MØ€LØÐØ€JÜ“E€MØÐö)÷"6õ6ðp$(Ð ðKÜ—k‘k“mˆ Ø×%Ñ%¡l°;ÀÓ&EÓFˆ Ø×ј*Ô%Ø×$Ñ$ YÔ/à�‰ÔØ'+Ð$áØ#×1Ñ1Ó3Ð ð *Ø&×&Ð&ð $Ð òñ.ô!Ð!8Ð:NÓOÐ OØ 'Ð 3Ø.Ð .ؘl¨JÐ6à Ð4Ñ6Jð'ùÜ!×0Ñ0ò *Ø/1Ð,Û)�DØ�D—K‘K §¡Ò)õ*ûð *ûð Ð4Ñ6Jüsa�AEÁA2D=ÃC;ÃC9ÃC;ÃD=ÃD=Ã5EÃ9C;Ã;D:Ä"D5Ä0D=Ä5D:Ä:D=Ä=EÅE) Ú__doc__Ú__all__rÚrrrrrr©rrÚrLs(ðÙLà €ãåÝ*ÝÝð37õaKr