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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib64/python3.6/concurrent/futures/__pycache__
Viewing File: /usr/lib64/python3.6/concurrent/futures/__pycache__/_base.cpython-36.pyc
3 \�R� @sPdZddlZddlZddlZddlZdZdZdZdZdZ dZ d Z d Z d Z e e e e e gZe d e d e de de diZejd�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd�de�ZGdd �d e�Zd!d"�Zd#d$�Zd/d%d&�Zejd'd(�Z defd)d*�Z!Gd+d,�d,e�Z"Gd-d.�d.e�Z#dS)0z"Brian Quinlan (brian@sweetapp.com)�N�FIRST_COMPLETED�FIRST_EXCEPTION� ALL_COMPLETED� _AS_COMPLETED�PENDING�RUNNING� CANCELLED�CANCELLED_AND_NOTIFIED�FINISHED�pending�running� cancelled�finishedzconcurrent.futuresc@seZdZdZdS)�Errorz-Base class for all future-related exceptions.N)�__name__� __module__� __qualname__�__doc__�rr�/usr/lib64/python3.6/_base.pyr,src@seZdZdZdS)�CancelledErrorzThe Future was cancelled.N)rrrrrrrrr0src@seZdZdZdS)� TimeoutErrorz*The operation exceeded the given deadline.N)rrrrrrrrr4src@s0eZdZdZdd�Zdd�Zdd�Zdd �Zd S) �_Waiterz;Provides the event that wait() and as_completed() block on.cCstj�|_g|_dS)N)� threadingZEvent�event�finished_futures)�selfrrr�__init__:s z_Waiter.__init__cCs|jj|�dS)N)r�append)r�futurerrr� add_result>sz_Waiter.add_resultcCs|jj|�dS)N)rr)rrrrr� add_exceptionAsz_Waiter.add_exceptioncCs|jj|�dS)N)rr)rrrrr� add_cancelledDsz_Waiter.add_cancelledN)rrrrrr r!r"rrrrr8s rcsDeZdZdZ�fdd�Z�fdd�Z�fdd�Z�fdd �Z�ZS) �_AsCompletedWaiterzUsed by as_completed().cstt|�j�tj�|_dS)N)�superr#rr�Lock�lock)r)� __class__rrrJsz_AsCompletedWaiter.__init__c s0|j� tt|�j|�|jj�WdQRXdS)N)r&r$r#r r�set)rr)r'rrr Nsz_AsCompletedWaiter.add_resultc s0|j� tt|�j|�|jj�WdQRXdS)N)r&r$r#r!rr()rr)r'rrr!Ssz _AsCompletedWaiter.add_exceptionc s0|j� tt|�j|�|jj�WdQRXdS)N)r&r$r#r"rr()rr)r'rrr"Xsz _AsCompletedWaiter.add_cancelled) rrrrrr r!r"� __classcell__rr)r'rr#Gs    r#cs8eZdZdZ�fdd�Z�fdd�Z�fdd�Z�ZS)�_FirstCompletedWaiterz*Used by wait(return_when=FIRST_COMPLETED).cst�j|�|jj�dS)N)r$r rr()rr)r'rrr `s z _FirstCompletedWaiter.add_resultcst�j|�|jj�dS)N)r$r!rr()rr)r'rrr!ds z#_FirstCompletedWaiter.add_exceptioncst�j|�|jj�dS)N)r$r"rr()rr)r'rrr"hs z#_FirstCompletedWaiter.add_cancelled)rrrrr r!r"r)rr)r'rr*]s  r*csLeZdZdZ�fdd�Zdd�Z�fdd�Z�fdd �Z�fd d �Z�Z S) �_AllCompletedWaiterz<Used by wait(return_when=FIRST_EXCEPTION and ALL_COMPLETED).cs$||_||_tj�|_t�j�dS)N)�num_pending_calls�stop_on_exceptionrr%r&r$r)rr,r-)r'rrros z_AllCompletedWaiter.__init__c Cs4|j�$|jd8_|js&|jj�WdQRXdS)N�)r&r,rr()rrrr�_decrement_pending_callsusz,_AllCompletedWaiter._decrement_pending_callscst�j|�|j�dS)N)r$r r/)rr)r'rrr {s z_AllCompletedWaiter.add_resultcs*t�j|�|jr|jj�n|j�dS)N)r$r!r-rr(r/)rr)r'rrr!s  z!_AllCompletedWaiter.add_exceptioncst�j|�|j�dS)N)r$r"r/)rr)r'rrr"�s z!_AllCompletedWaiter.add_cancelled) rrrrrr/r r!r"r)rr)r'rr+ls    r+c@s(eZdZdZdd�Zdd�Zdd�ZdS) �_AcquireFutureszDA context manager that does an ordered acquire of Future conditions.cCst|td�|_dS)N)�key)�sorted�id�futures)rr4rrrr�sz_AcquireFutures.__init__cCsx|jD]}|jj�qWdS)N)r4� _condition�acquire)rrrrr� __enter__�s z_AcquireFutures.__enter__cGsx|jD]}|jj�qWdS)N)r4r5�release)r�argsrrrr�__exit__�s z_AcquireFutures.__exit__N)rrrrrr7r:rrrrr0�sr0cCs�|tkrt�}nZ|tkr t�}nJtdd�|D��}|tkrHt|dd�}n"|tkr^t|dd�}n td|��x|D]}|j j |�qpW|S)Ncss|]}|jttgkVqdS)N)�_stater r )�.0�frrr� <genexpr>�sz._create_and_install_waiters.<locals>.<genexpr>T)r-FzInvalid return condition: %r) rr#rr*�sumrr+r� ValueError�_waitersr)�fs� return_when�waiterZ pending_countr=rrr�_create_and_install_waiters�s  rEc csXxR|rR|d}x|D]}|j|�qW|j�|jj|�WdQRX~|j�VqWdS)a~ Iterate on the list *fs*, yielding finished futures one by one in reverse order. Before yielding a future, *waiter* is removed from its waiters and the future is removed from each set in the collection of sets *ref_collect*. The aim of this function is to avoid keeping stale references after the future is yielded and before the iterator resumes. r.N���)�remover5rA�pop)rBrD� ref_collectr=Z futures_setrrr�_yield_finished_futures�s  rJc csJ|dk r|tj�}t|�}t|�}t|��*tdd�|D��}||}t|t�}WdQRXt|�}z�t|||fd�EdHx�|�r|dkr�d}n(|tj�}|dkr�t dt|�|f��|j j |�|j �|j }g|_ |j j�WdQRX|j�t||||fd�EdHq~WWdx,|D]$}|j�|jj|�WdQRX�qWXdS)anAn iterator over the given futures that yields each as it completes. Args: fs: The sequence of Futures (possibly created by different Executors) to iterate over. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. Returns: An iterator that yields the given Futures as they complete (finished or cancelled). If any given Futures are duplicated, they will be returned once. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. Ncss |]}|jttgkr|VqdS)N)r;r r )r<r=rrrr>�szas_completed.<locals>.<genexpr>)rIrz%d (of %d) futures unfinished)�time� monotonicr(�lenr0rEr�listrJrr�waitr&r�clear�reverser5rArG) rB�timeout�end_timeZ total_futuresrr rDZ wait_timeoutr=rrr� as_completed�s@     rT�DoneAndNotDoneFuturesz done not_donecCs�t|���tdd�|D��}t|�|}|tkr>|r>t||�S|tkrf|rftdd�|D��rft||�St|�t|�kr�t||�St||�}WdQRX|jj |�x*|D]"}|j �|j j |�WdQRXq�W|j |j�t|t|�|�S)aWait for the futures in the given sequence to complete. Args: fs: The sequence of Futures (possibly created by different Executors) to wait upon. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. return_when: Indicates when this function should return. The options are: FIRST_COMPLETED - Return when any future finishes or is cancelled. FIRST_EXCEPTION - Return when any future finishes by raising an exception. If no future raises an exception then it is equivalent to ALL_COMPLETED. ALL_COMPLETED - Return when all futures finish or are cancelled. Returns: A named 2-tuple of sets. The first set, named 'done', contains the futures that completed (is finished or cancelled) before the wait completed. The second set, named 'not_done', contains uncompleted futures. css |]}|jttgkr|VqdS)N)r;r r )r<r=rrrr>szwait.<locals>.<genexpr>css(|] }|j� r|j�dk r|VqdS)N)r � exception)r<r=rrrr>$sN)r0r(rrUr�anyrMrErrOr5rArG�updater)rBrRrC�doneZnot_donerDr=rrrrOs"          rOc@s�eZdZdZdd�Zdd�Zdd�Zdd �Zd d �Zd d �Z dd�Z dd�Z dd�Z ddd�Z d dd�Zdd�Zdd�Zdd�ZdS)!�Futurez5Represents the result of an asynchronous computation.cCs,tj�|_t|_d|_d|_g|_g|_dS)z8Initializes the future. Should not be called by clients.N) rZ Conditionr5rr;�_result� _exceptionrA�_done_callbacks)rrrrr8s  zFuture.__init__c CsBx<|jD]2}y ||�Wqtk r8tjd|�YqXqWdS)Nz!exception calling callback for %r)r]� Exception�LOGGERrV)r�callbackrrr�_invoke_callbacksAs   zFuture._invoke_callbacksc Cs�|j�v|jtkr`|jr<d|jjt|�t|j|jjjfSd|jjt|�t|j|jjjfSd|jjt|�t|jfSQRXdS)Nz<%s at %#x state=%s raised %s>z <%s at %#x state=%s returned %s>z<%s at %#x state=%s>) r5r;r r\r'rr3�_STATE_TO_DESCRIPTION_MAPr[)rrrr�__repr__Hs" zFuture.__repr__c CsR|j�:|jttgkrdS|jttgkr,dSt|_|jj�WdQRX|j�dS)z�Cancel the future if possible. Returns True if the future was cancelled, False otherwise. A future cannot be cancelled if it is running or has already completed. FTN)r5r;rr rr � notify_allra)rrrr�cancel\sz Future.cancelc Cs |j�|jttgkSQRXdS)z(Return True if the future was cancelled.N)r5r;rr )rrrrr oszFuture.cancelledc Cs|j� |jtkSQRXdS)z1Return True if the future is currently executing.N)r5r;r)rrrrr tszFuture.runningc Cs"|j�|jtttgkSQRXdS)z>Return True of the future was cancelled or finished executing.N)r5r;rr r )rrrrrYysz Future.donecCs|jr|j�n|jSdS)N)r\r[)rrrrZ __get_result~szFuture.__get_resultc Cs>|j�&|jtttgkr(|jj|�dSWdQRX||�dS)a%Attaches a callable that will be called when the future finishes. Args: fn: A callable that will be called with this future as its only argument when the future completes or is cancelled. The callable will always be called by a thread in the same process in which it was added. If the future has already completed or been cancelled then the callable will be called immediately. These callables are called in the order that they were added. N)r5r;rr r r]r)r�fnrrr�add_done_callback�s  zFuture.add_done_callbackNc Csx|j�h|jttgkrt��n|jtkr0|j�S|jj|�|jttgkrRt��n|jtkrd|j�St��WdQRXdS)aBReturn the result of the call that the future represents. Args: timeout: The number of seconds to wait for the result if the future isn't done. If None, then there is no limit on the wait time. Returns: The result of the call that the future represents. Raises: CancelledError: If the future was cancelled. TimeoutError: If the future didn't finish executing before the given timeout. Exception: If the call raised then that exception will be raised. N) r5r;rr rr �_Future__get_resultrOr)rrRrrr�result�s   z Future.resultc Cst|j�d|jttgkrt��n|jtkr.|jS|jj|�|jttgkrPt��n|jtkr`|jSt��WdQRXdS)aUReturn the exception raised by the call that the future represents. Args: timeout: The number of seconds to wait for the exception if the future isn't done. If None, then there is no limit on the wait time. Returns: The exception raised by the call that the future represents or None if the call completed without raising. Raises: CancelledError: If the future was cancelled. TimeoutError: If the future didn't finish executing before the given timeout. N) r5r;rr rr r\rOr)rrRrrrrV�s   zFuture.exceptionc Cst|j�d|jtkr6t|_x|jD]}|j|�q WdS|jtkrJt|_dStj dt |�|j�t d��WdQRXdS)a�Mark the future as running or process any cancel notifications. Should only be used by Executor implementations and unit tests. If the future has been cancelled (cancel() was called and returned True) then any threads waiting on the future completing (though calls to as_completed() or wait()) are notified and False is returned. If the future was not cancelled then it is put in the running state (future calls to running() will return True) and True is returned. This method should be called by Executor implementations before executing the work associated with this future. If this method returns False then the work should not be executed. Returns: False if the Future was cancelled, True otherwise. Raises: RuntimeError: if this method was already called or if set_result() or set_exception() was called. FTz!Future %s in unexpected state: %szFuture in unexpected stateN) r5r;rr rAr"rrr_Zcriticalr3� RuntimeError)rrDrrr�set_running_or_notify_cancel�s   z#Future.set_running_or_notify_cancelc CsN|j�6||_t|_x|jD]}|j|�qW|jj�WdQRX|j�dS)z�Sets the return value of work associated with the future. Should only be used by Executor implementations and unit tests. N)r5r[r r;rAr rdra)rrirDrrr� set_result�s zFuture.set_resultc CsN|j�6||_t|_x|jD]}|j|�qW|jj�WdQRX|j�dS)z�Sets the result of the future as being the given exception. Should only be used by Executor implementations and unit tests. N)r5r\r r;rAr!rdra)rrVrDrrr� set_exception s zFuture.set_exception)N)N)rrrrrrarcrer r rYrhrgrirVrkrlrmrrrrrZ5s   "( rZc@sBeZdZdZdd�Zddd�dd�Zdd d �Zd d �Zdd�ZdS)�ExecutorzCThis is an abstract base class for concrete asynchronous executors.cOs t��dS)a Submits a callable to be executed with the given arguments. Schedules the callable to be executed as fn(*args, **kwargs) and returns a Future instance representing the execution of the callable. Returns: A Future representing the given call. N)�NotImplementedError)rrfr9�kwargsrrr�submits zExecutor.submitNr.)rR� chunksizecsB�dk r�tj����fdd�t|�D�����fdd�}|�S)a}Returns an iterator equivalent to map(fn, iter). Args: fn: A callable that will take as many arguments as there are passed iterables. timeout: The maximum number of seconds to wait. If None, then there is no limit on the wait time. chunksize: The size of the chunks the iterable will be broken into before being passed to a child process. This argument is only used by ProcessPoolExecutor; it is ignored by ThreadPoolExecutor. Returns: An iterator equivalent to: map(func, *iterables) but the calls may be evaluated out-of-order. Raises: TimeoutError: If the entire result iterator could not be generated before the given timeout. Exception: If fn(*args) raises for any values. Ncsg|]}�j�f|���qSr)rq)r<r9)rfrrr� <listcomp>?sz Executor.map.<locals>.<listcomp>c 3sdzF�j�x8�rB�dkr(�j�j�Vq �j�j�tj��Vq WWdx�D] }|j�qNWXdS)N)rQrHrirKrLre)r)rSrBrRrr�result_iteratorCs  z%Executor.map.<locals>.result_iterator)rKrL�zip)rrfrRrr� iterablesrtr)rSrfrBrrRr�map&s   z Executor.mapTcCsdS)a�Clean-up the resources associated with the Executor. It is safe to call this method several times. Otherwise, no other methods can be called after this one. Args: wait: If True then shutdown will not return until all running futures have finished executing and the resources used by the executor have been reclaimed. Nr)rrOrrr�shutdownRs zExecutor.shutdowncCs|S)Nr)rrrrr7_szExecutor.__enter__cCs|jdd�dS)NT)rOF)rx)r�exc_typeZexc_valZexc_tbrrrr:bs zExecutor.__exit__)T) rrrrrqrwrxr7r:rrrrrns  , rn)N)$� __author__� collectionsZloggingrrKrrrrrrrr r Z_FUTURE_STATESrbZ getLoggerr_r^rrr�objectrr#r*r+r0rErJrT� namedtuplerUrOrZrnrrrr�<module>sR  >1d