File: //lib64/python3.6/site-packages/tornado/__pycache__/concurrent.cpython-36.opt-1.pyc
3
��f� � @ s� d Z ddlZddlmZ ddlZddlZddlZddlmZ ddl Z ddl m
Z
mZmZm
Z
mZ e jd�ZG dd� de�ZejZejefZe
ed �d
d�ZG dd
� d
ej�Ze� Ze
e
ed�dd�Ze� Zdddd�dd�Zdedd�dd�Zdedd�dd�Z de
ee! ee eej" f dd�dd�Z#e j$dedgdf dd �d!d"��Z%e j$dedgdf dd �d#d"��Z%ded& dd �d%d"�Z%dS )'a� Utilities for working with ``Future`` objects.
Tornado previously provided its own ``Future`` class, but now uses
`asyncio.Future`. This module contains utility functions for working
with `asyncio.Future` in a way that is backwards-compatible with
Tornado's old ``Future`` implementation.
While this module is an important part of Tornado's internal
implementation, applications rarely need to interact with it
directly.
� N)�futures)�app_log)�Any�Callable�Optional�Tuple�Union�_Tc @ s e Zd ZdS )�ReturnValueIgnoredErrorN)�__name__�
__module__�__qualname__� r r �"/usr/lib64/python3.6/concurrent.pyr
* s r
)�x�returnc C s
t | t�S )N)�
isinstance�FUTURES)r r r r � is_future4 s r c @ s: e Zd Zedef eedd�dd�Zdedd�d d
�ZdS )�
DummyExecutor.zfutures.Future[_T])�fn�args�kwargsr c O sD t j� }yt||||�� W n" tk
r> t|tj� � Y nX |S )N)r �Future�"future_set_result_unless_cancelled� Exception�future_set_exc_info�sys�exc_info)�selfr r r �futurer r r �submit9 s zDummyExecutor.submitTN)�waitr c C s d S )Nr )r r"