Viewing File: /lib64/python3.8/asyncio/__pycache__/staggered.cpython-38.opt-2.pyc

U

e5dh�
@s�dZddlZddlZddlmZddlmZddlmZddlmZdd�ej	ej
gejfeje
ejejejejeejejefd	�d
d�ZdS))�staggered_race�N�)�events)�
exceptions)�locks)�tasks)�loop)�coro_fns�delayr�returnc	�s��p
t���t|��d�d�g�g�tjtjdd���������fdd�����d��}��|�z<d}|t
��kr�t���IdH\}}t
|�}ql���fW�S�D]}|�	�q�XdS)N)�previous_failedrc	
�s|dk	r6t�tj��t�|����IdHW5QRXzt��\}}Wntk
r\YdSXt	�
�}���|��}��|���d�z|�IdH}WnJt
tfk
r��Yn\tk
r�}z|�|<|��W5d}~XYn,X|�|�t��D]\}}||kr�|��q�dS)N)�
contextlib�suppress�exceptions_mod�TimeoutErrorrZwait_for�wait�next�
StopIterationr�Event�create_task�append�
SystemExit�KeyboardInterrupt�
BaseException�set�	enumerate�cancel)	rZ
this_indexZcoro_fnZthis_failedZ	next_task�result�e�i�t�r
Z
enum_coro_fnsrr�run_one_coroZ
running_tasksZwinner_indexZ
winner_result��)/usr/lib64/python3.8/asyncio/staggered.pyr"Rs. 

z$staggered_race.<locals>.run_one_coror)
rZget_running_loopr�typing�Optionalrrrrr�lenrr)r	r
rZ
first_taskr Z
done_countZdone�_r#r!r$rs(=
�0
r)�__all__r
r%�rrrrr�Iterable�Callable�	Awaitabler&�floatZAbstractEventLoopZTupleZAny�intZList�	Exceptionrr#r#r#r$�<module>s$����
Back to Directory File Manager