U
e5db3 ã @ sú d Z dZddlZddlZddlZddlZddlmZ ddlm Z ddlm
Z
ddlmZ ejZej
Z
ejZejZejd ZG d d
„ d
ƒZeZdd„ Zd
d„ Zdd„ Zdd„ Zdd„ Zdd„ Zddœdd„ZzddlZW n ek
rê Y nX ej ZZdS )z.A Future class similar to the one in PEP 3148.)ÚFutureÚwrap_futureÚisfutureé Né )Úbase_futures)Úevents)Ú
exceptions)Ú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