a
´iÚ6 ã @ s d Z dZddlZddlZddlZddlZddlmZ ddl m
Z
ddl mZ ddl mZ dd l m
Z
e
jZe
jZe
jZe
jZejd ZG d
d„ dƒZeZdd
„ Zdd„ Zdd„ Zdd„ Zdd„ Zdd„ Zddœdd„ZzddlZW n eyô Y n0 ej ZZdS )z.A Future class similar to the one in PEP 3148.)ÚFutureÚwrap_futureÚisfutureé N)ÚGenericAliasé )Úbase_futures)Úevents)Ú
exceptions)Úformat_helpersc @ sî e Zd ZdZeZdZdZdZdZ dZ
dZdZdZ
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 )*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@ |du rt ¡ | _n|| _g | _| j ¡ r