$87 GRAYBYTE WORDPRESS FILE MANAGER $77

SERVER : premium201.web-hosting.com #1 SMP Wed Mar 26 12:08:09 UTC 2025
SERVER IP : 172.67.217.254 | ADMIN IP 216.73.216.157
OPTIONS : CRL = ON | WGT = ON | SDO = OFF | PKEX = OFF
DEACTIVATED : mail

/opt/alt/python310/lib64/python3.10/asyncio/__pycache__/

HOME
Current File : /opt/alt/python310/lib64/python3.10/asyncio/__pycache__//futures.cpython-310.opt-1.pyc
o

���hk7�@sdZdZddlZddlZddlZddlZddlmZddl	m
Z
ddl	mZddl	mZdd	l	m
Z
e
jZe
jZe
jZe
jZejdZGd
d�d�ZeZdd
�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�dd�ZzddlZWn
ey{YdSwejZZdS)z.A Future class similar to the one in PEP 3148.)�Future�wrap_future�isfuture�N)�GenericAlias�)�base_futures)�events)�
exceptions)�format_helpersc@s�eZdZdZeZdZdZdZdZ	dZ
dZdZdZ
dd�dd�ZejZdd�Zd	d
�Zee�Zedd��Zejd
d��Zdd�Zdd�Zd)dd�Zdd�Zdd�Zdd�Zdd�Z dd�Z!dd�dd �Z"d!d"�Z#d#d$�Z$d%d&�Z%d'd(�Z&e&Z'dS)*ra,This class is *almost* compatible with concurrent.futures.Future.

    Differences:

    - This class is not thread-safe.

    - result() and exception() do not take a timeout argument and
      raise an exception when the future isn't done yet.

    - Callbacks registered with add_done_callback() are always called
      via the event loop's call_soon().

    - This class is not compatible with the wait() and as_completed()
      methods in the concurrent.futures package.

    (In Python 3.4 or later we may be able to unify the implementations.)
    NF��loopcCsD|dur
t��|_n||_g|_|j��r t�t�d��|_	dSdS)z�Initialize the future.

        The optional event_loop argument allows explicitly setting the event
        loop object used by the future. If it's not provided, the future uses
        the default event loop.
        Nr)
r�_get_event_loop�_loop�
_callbacksZ	get_debugr
�
extract_stack�sys�	_getframe�_source_traceback��selfr�r�6/opt/alt/python310/lib64/python3.10/asyncio/futures.py�__init__Hs

��zFuture.__init__cCsd�|jjd�|����S)Nz<{} {}>� )�format�	__class__�__name__�join�
_repr_info�rrrr�__repr__Zs
�zFuture.__repr__cCsF|jsdS|j}|jj�d�||d�}|jr|j|d<|j�|�dS)Nz exception was never retrieved)�message�	exception�futureZsource_traceback)�_Future__log_traceback�
_exceptionrrrrZcall_exception_handler)r�exc�contextrrr�__del__^s�
zFuture.__del__cCs|jS�N)r$rrrr�_log_tracebackpszFuture._log_tracebackcCs|rtd��d|_dS)Nz'_log_traceback can only be set to FalseF)�
ValueErrorr$)r�valrrrr*ts
cCs|j}|durtd��|S)z-Return the event loop the Future is bound to.Nz!Future object is not initialized.)r�RuntimeErrorrrrr�get_loopzszFuture.get_loopcCs2|jdur
t��}nt�|j�}|j|_d|_|S)z�Create the CancelledError to raise if the Future is cancelled.

        This should only be called once when handling a cancellation since
        it erases the saved context exception value.
        N)�_cancel_messager	�CancelledError�_cancelled_exc�__context__�rr&rrr�_make_cancelled_error�s

zFuture._make_cancelled_errorcCs,d|_|jtkr
dSt|_||_|��dS)z�Cancel the future and schedule callbacks.

        If the future is already done or cancelled, return False.  Otherwise,
        change the future's state to cancelled, schedule the callbacks and
        return True.
        FT)r$�_state�_PENDING�
_CANCELLEDr/�_Future__schedule_callbacks)r�msgrrr�cancel�s
z
Future.cancelcCsH|jdd�}|sdSg|jdd�<|D]
\}}|jj|||d�qdS)z�Internal: Ask the event loop to call all callbacks.

        The callbacks are scheduled to be called as soon as possible. Also
        clears the callback list.
        N�r')rr�	call_soon)rZ	callbacks�callback�ctxrrrZ__schedule_callbacks�s�zFuture.__schedule_callbackscCs
|jtkS)z(Return True if the future was cancelled.)r5r7rrrr�	cancelled�s
zFuture.cancelledcCs
|jtkS)z�Return True if the future is done.

        Done means either that a result / exception are available, or that the
        future was cancelled.
        )r5r6rrrr�done�s
zFuture.donecCsN|jtkr|��}|�|jtkrt�d��d|_|jdur$|j�|j	��|j
S)aReturn the result this future represents.

        If the future has been cancelled, raises CancelledError.  If the
        future's result isn't yet available, raises InvalidStateError.  If
        the future is done and has an exception set, this exception is raised.
        zResult is not ready.FN)r5r7r4�	_FINISHEDr	�InvalidStateErrorr$r%�with_traceback�
_exception_tb�_resultr3rrr�result�s



z
Future.resultcCs6|jtkr|��}|�|jtkrt�d��d|_|jS)a&Return the exception that was set on this future.

        The exception (or None if no exception was set) is returned only if
        the future is done.  If the future has been cancelled, raises
        CancelledError.  If the future isn't done yet, raises
        InvalidStateError.
        zException is not set.F)r5r7r4rAr	rBr$r%r3rrrr"�s


zFuture.exceptionr;cCsD|jtkr|jj|||d�dS|durt��}|j�||f�dS)z�Add a callback to be run when the future becomes done.

        The callback is called with a single argument - the future object. If
        the future is already done when this is called, the callback is
        scheduled with call_soon.
        r;N)r5r6rr<�contextvarsZcopy_contextr�append)r�fnr'rrr�add_done_callback�s

zFuture.add_done_callbackcs<�fdd�|jD�}t|j�t|�}|r||jdd�<|S)z}Remove all instances of a callback from the "call when done" list.

        Returns the number of callbacks removed.
        cs g|]\}}|�kr||f�qSrr)�.0�fr>�rIrr�
<listcomp>�s
�z/Future.remove_done_callback.<locals>.<listcomp>N)r�len)rrIZfiltered_callbacksZ
removed_countrrMr�remove_done_callback�s
�zFuture.remove_done_callbackcCs8|jtkrt�|j�d|����||_t|_|��dS)z�Mark the future done and set its result.

        If the future is already done when this method is called, raises
        InvalidStateError.
        �: N)r5r6r	rBrErAr8)rrFrrr�
set_result�s

zFuture.set_resultcCsj|jtkrt�|j�d|����t|t�r|�}t|�tur"td��||_|j	|_
t|_|��d|_
dS)z�Mark the future done and set an exception.

        If the future is already done when this method is called, raises
        InvalidStateError.
        rQzPStopIteration interacts badly with generators and cannot be raised into a FutureTN)r5r6r	rB�
isinstance�type�
StopIteration�	TypeErrorr%�
__traceback__rDrAr8r$)rr"rrr�
set_exceptions


zFuture.set_exceptionccs.�|��sd|_|V|��std��|��S)NTzawait wasn't used with future)r@�_asyncio_future_blockingr-rFrrrr�	__await__s�zFuture.__await__r))(r�
__module__�__qualname__�__doc__r6r5rEr%rrr/r1rYr$rrZ_future_repr_inforr r(�classmethodr�__class_getitem__�propertyr*�setterr.r4r:r8r?r@rFr"rJrPrRrXrZ�__iter__rrrrrsD


rcCs&z|j}W|�StyY|jSwr))r.�AttributeErrorr)�futr.rrr�	_get_loop)s��recCs|��rdS|�|�dS)z?Helper setting the result only if the future was not cancelled.N)r?rR)rdrFrrr�_set_result_unless_cancelled5srfcCsTt|�}|tjjurtj|j�S|tjjurtj|j�S|tjjur(tj|j�S|Sr))rT�
concurrent�futuresr0r	�args�TimeoutErrorrB)r&Z	exc_classrrr�_convert_future_exc<srkcCsT|��r|��|��sdS|��}|dur|�t|��dS|��}|�|�dS)z8Copy state from a future to a concurrent.futures.Future.N)r?r:Zset_running_or_notify_cancelr"rXrkrFrR)rg�sourcer"rFrrr�_set_concurrent_future_stateHsrmcCsX|��rdS|��r|��dS|��}|dur!|�t|��dS|��}|�|�dS)zqInternal helper to copy state from another Future.

    The other Future may be a concurrent.futures.Future.
    N)r?r:r"rXrkrFrR)rl�destr"rFrrr�_copy_future_stateWsrocs�t��st�tjj�std��t��st�tjj�std��t��r&t��nd�t��r0t��nd�dd�����fdd�}����fdd	�}��|���|�dS)
aChain two futures so that when one completes, so does the other.

    The result (or exception) of source will be copied to destination.
    If destination is cancelled, source gets cancelled too.
    Compatible with both asyncio.Future and concurrent.futures.Future.
    z(A future is required for source argumentz-A future is required for destination argumentNcSs$t|�rt||�dSt||�dSr))rrorm)r#�otherrrr�
_set_state{sz!_chain_future.<locals>._set_statecs8|��r�dus��ur���dS���j�dSdSr))r?r:�call_soon_threadsafe)�destination)�	dest_looprl�source_looprr�_call_check_cancel�s
�z)_chain_future.<locals>._call_check_cancelcsX���r�dur���rdS�dus��ur��|�dS���r#dS����|�dSr))r?Z	is_closedrr)rl)rqrtrsrurr�_call_set_state�sz&_chain_future.<locals>._call_set_state)rrSrgrhrrVrerJ)rlrsrvrwr)rqrtrsrlrur�
_chain_futureks��
rxrcCs2t|�r|S|durt��}|��}t||�|S)z&Wrap concurrent.futures.Future object.N)rrr
Z
create_futurerx)r#rZ
new_futurerrrr�s
r) r]�__all__Zconcurrent.futuresrgrGZloggingr�typesr�rrr	r
rr6r7rA�DEBUGZSTACK_DEBUGrZ	_PyFuturererfrkrmrorxrZ_asyncio�ImportErrorZ_CFuturerrrr�<module>sB

,
�


Current_dir [ NOT WRITEABLE ] Document_root [ NOT WRITEABLE ]


[ Back ]
NAME
SIZE
LAST TOUCH
USER
CAN-I?
FUNCTIONS
..
--
10 Feb 2026 9.36 AM
root / linksafe
0755
__init__.cpython-310.opt-1.pyc
0.742 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
__init__.cpython-310.opt-2.pyc
0.691 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
__init__.cpython-310.pyc
0.742 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
__main__.cpython-310.opt-1.pyc
3.149 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
__main__.cpython-310.opt-2.pyc
3.149 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
__main__.cpython-310.pyc
3.149 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_events.cpython-310.opt-1.pyc
50.549 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_events.cpython-310.opt-2.pyc
42.196 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_events.cpython-310.pyc
50.652 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_futures.cpython-310.opt-1.pyc
1.882 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_futures.cpython-310.opt-2.pyc
1.646 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_futures.cpython-310.pyc
1.882 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_subprocess.cpython-310.opt-1.pyc
9.115 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_subprocess.cpython-310.opt-2.pyc
9.021 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_subprocess.cpython-310.pyc
9.182 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_tasks.cpython-310.opt-1.pyc
1.95 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_tasks.cpython-310.opt-2.pyc
1.95 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
base_tasks.cpython-310.pyc
1.95 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
constants.cpython-310.opt-1.pyc
0.588 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
constants.cpython-310.opt-2.pyc
0.588 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
constants.cpython-310.pyc
0.588 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
coroutines.cpython-310.opt-1.pyc
6.419 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
coroutines.cpython-310.opt-2.pyc
6.205 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
coroutines.cpython-310.pyc
6.481 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
events.cpython-310.opt-1.pyc
27.576 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
events.cpython-310.opt-2.pyc
18.586 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
events.cpython-310.pyc
27.658 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
exceptions.cpython-310.opt-1.pyc
2.426 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
exceptions.cpython-310.opt-2.pyc
1.822 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
exceptions.cpython-310.pyc
2.426 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
format_helpers.cpython-310.opt-1.pyc
2.3 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
format_helpers.cpython-310.opt-2.pyc
2.069 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
format_helpers.cpython-310.pyc
2.3 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
futures.cpython-310.opt-1.pyc
11.477 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
futures.cpython-310.opt-2.pyc
8.131 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
futures.cpython-310.pyc
11.624 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
locks.cpython-310.opt-1.pyc
13.856 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
locks.cpython-310.opt-2.pyc
7.807 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
locks.cpython-310.pyc
13.856 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
log.cpython-310.opt-1.pyc
0.239 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
log.cpython-310.opt-2.pyc
0.205 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
log.cpython-310.pyc
0.239 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
mixins.cpython-310.opt-1.pyc
1.067 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
mixins.cpython-310.opt-2.pyc
1.037 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
mixins.cpython-310.pyc
1.067 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
proactor_events.cpython-310.opt-1.pyc
23.915 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
proactor_events.cpython-310.opt-2.pyc
23.548 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
proactor_events.cpython-310.pyc
24.135 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
protocols.cpython-310.opt-1.pyc
8.119 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
protocols.cpython-310.opt-2.pyc
3.186 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
protocols.cpython-310.pyc
8.119 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
queues.cpython-310.opt-1.pyc
8.121 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
queues.cpython-310.opt-2.pyc
5.566 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
queues.cpython-310.pyc
8.121 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
runners.cpython-310.opt-1.pyc
2.059 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
runners.cpython-310.opt-2.pyc
1.396 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
runners.cpython-310.pyc
2.059 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
selector_events.cpython-310.opt-1.pyc
28.859 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
selector_events.cpython-310.opt-2.pyc
27.289 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
selector_events.cpython-310.pyc
28.9 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
sslproto.cpython-310.opt-1.pyc
21.291 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
sslproto.cpython-310.opt-2.pyc
14.604 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
sslproto.cpython-310.pyc
21.455 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
staggered.cpython-310.opt-1.pyc
3.98 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
staggered.cpython-310.opt-2.pyc
1.905 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
staggered.cpython-310.pyc
4.101 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
streams.cpython-310.opt-1.pyc
19.726 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
streams.cpython-310.opt-2.pyc
14.041 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
streams.cpython-310.pyc
19.921 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
subprocess.cpython-310.opt-1.pyc
6.898 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
subprocess.cpython-310.opt-2.pyc
6.781 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
subprocess.cpython-310.pyc
6.912 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
tasks.cpython-310.opt-1.pyc
23.374 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
tasks.cpython-310.opt-2.pyc
16.039 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
tasks.cpython-310.pyc
23.427 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
threads.cpython-310.opt-1.pyc
0.978 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
threads.cpython-310.opt-2.pyc
0.53 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
threads.cpython-310.pyc
0.978 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
transports.cpython-310.opt-1.pyc
12.045 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
transports.cpython-310.opt-2.pyc
6.702 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
transports.cpython-310.pyc
12.059 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
trsock.cpython-310.opt-1.pyc
7.674 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
trsock.cpython-310.opt-2.pyc
7.428 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
trsock.cpython-310.pyc
7.674 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
unix_events.cpython-310.opt-1.pyc
40.421 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
unix_events.cpython-310.opt-2.pyc
35.423 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
unix_events.cpython-310.pyc
40.729 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_events.cpython-310.opt-1.pyc
23.598 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_events.cpython-310.opt-2.pyc
22.556 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_events.cpython-310.pyc
23.613 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_utils.cpython-310.opt-1.pyc
4.34 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_utils.cpython-310.opt-2.pyc
3.932 KB
9 Jan 2026 2.06 PM
root / linksafe
0644
windows_utils.cpython-310.pyc
4.406 KB
9 Jan 2026 2.06 PM
root / linksafe
0644

GRAYBYTE WORDPRESS FILE MANAGER @ 2025 CONTACT ME
Static GIF