ok
Direktori : /opt/alt/python311/lib64/python3.11/asyncio/__pycache__/ |
Current File : //opt/alt/python311/lib64/python3.11/asyncio/__pycache__/futures.cpython-311.opt-1.pyc |
� �f�7 � �8 � d Z dZddlZddlZddlZddlZddlmZ ddl m Z ddl mZ ddl mZ dd l m Z e j Ze j Ze j Ze j Zej dz Z G d � d� � ZeZd� Zd � Zd� Zd� Zd� Zd� Zdd�d�Z ddlZej xZZdS # e$ r Y dS w xY w)z.A Future class similar to the one in PEP 3148.)�Future�wrap_future�isfuture� N)�GenericAlias� )�base_futures)�events)� exceptions)�format_helpersc �� � e Zd ZdZeZdZdZdZdZ dZ dZdZdZ dd�d�Zd� Zd� Z ee� � Zed� � � Zej d � � � Zd � Zd� Zdd�Zd � Zd� Zd� Zd� Zd� Zdd�d�Zd� Z d� Z!d� Z"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 �� � |�t j � � | _ n|| _ g | _ | j � � � r-t j t j d� � � � | _ dS 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� _callbacks� get_debugr � extract_stack�sys� _getframe�_source_traceback��selfr s �6/opt/alt/python311/lib64/python3.11/asyncio/futures.py�__init__zFuture.__init__H sq � � �<��/�1�1�D�J�J��D�J�����:���!�!� "�%3�%A�� �a� � �&"� &"�D�"�"�"� "� "� c �* � t j | � � S �N)r �_future_repr�r s r �__repr__zFuture.__repr__X s � ��(��.�.�.r c � � | j sd S | j }| j j � d�|| d�}| j r | j |d<