AlkantarClanX12
Current Path : /opt/alt/python37/lib64/python3.7/asyncio/__pycache__/ |
Current File : //opt/alt/python37/lib64/python3.7/asyncio/__pycache__/futures.cpython-37.pyc |
B � f2 � @ s� d Z dZddlZddlZddlZddlZddlmZ ddlm Z ddlm Z ejZejZej Z ejZejZejZejZejd ZG dd � d �ZeZd d� Zdd � Zdd� Zdd� Zdd� Zdd�dd�ZyddlZW n ek r� Y nX ej ZZdS )z.A Future class similar to the one in PEP 3148.)�CancelledError�TimeoutError�InvalidStateError�Future�wrap_future�isfuture� N� )�base_futures)�events)�format_helpersc @ s� e Zd ZdZeZdZdZdZdZ dZ dZdd�dd�Ze jZdd� Zd d � Zedd� �Zejd d� �Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd� Zdd�dd�Zdd � Zd!d"� Zd#d$� Zd%d&� Z e Z!dS )'r a, 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)�loopc C s@ |dkrt �� | _n|| _g | _| j�� r<t�t�d��| _ dS )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 �4/opt/alt/python37/lib64/python3.7/asyncio/futures.py�__init__G s zFuture.__init__c C s d� | jjd�| �� ��S )Nz<{} {}>� )�format� __class__�__name__�join� _repr_info)r r r r �__repr__Y s zFuture.__repr__c C sF | j s d S | j}| jj� d�|| d�}| jr6| j|d<