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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/__pycache__
Viewing File: /usr/lib64/python3.6/__pycache__/threading.cpython-36.pyc
3 \���@s|dZddlZddlZddlmZddlmZ ddl m Z ddl m ZmZyddlmZWn ek rxddlmZYnXdd d d d d dddddddddddddddgZejZejZejZejZejZy ejZ Wne!k r�dZ YnXej"Z"[da#da$dd�Z%dd�Z&eZ'dd�ZGd d!�d!�Z(e(Z)Gd"d �d �Z*Gd#d�d�Z+Gd$d�de+�Z,Gd%d�d�Z-Gd&d�d�Z.Gd'd�de/�Z0e�j1Z2e2�d@d)d*�Z3e�a4iZ5iZ6e �Z7Gd+d�d�Z8Gd,d�de8�Z9Gd-d.�d.e8�Z:Gd/d0�d0e8�Z;d1d �Z<e<Z=d2d �Z>e>Z?d3d4�Z@d5d �ZAdd6lmBZBe:�aCd7d8�ZDd9d:�ZEd;d �ZFydd<lmGZHWn"ek �rndd=lImHZHYnXd>d?�ZJdS)Az;Thread module emulating a subset of Java's threading model.�N)� monotonic)� format_exc)�WeakSet)�islice�count)�deque� get_ident� active_count� Condition�current_thread� enumerate� main_thread� TIMEOUT_MAX�Event�Lock�RLock� Semaphore�BoundedSemaphore�Thread�Barrier�BrokenBarrierError�Timer� ThreadError� setprofile�settrace�local� stack_sizecCs|adS)z�Set a profile function for all threads started from the threading module. The func will be passed to sys.setprofile() for each thread, before its run() method is called. N)� _profile_hook)�func�r�!/usr/lib64/python3.6/threading.pyr2scCs|adS)z�Set a trace function for all threads started from the threading module. The func will be passed to sys.settrace() for each thread, before its run() method is called. N)� _trace_hook)rrrr r<scOstdkrt||�St||�S)a2Factory function that returns a new reentrant lock. A reentrant lock must be released by the thread that acquired it. Once a thread has acquired a reentrant lock, the same thread may acquire it again without blocking; the thread must release it once for each time it has acquired it. N)�_CRLock�_PyRLock)�args�kwargsrrr rJs  c@sVeZdZdZdd�Zdd�Zddd �ZeZd d �Zd d �Z dd�Z dd�Z dd�Z dS)�_RLocka,This class implements reentrant lock objects. A reentrant lock must be released by the thread that acquired it. Once a thread has acquired a reentrant lock, the same thread may acquire it again without blocking; the thread must release it once for each time it has acquired it. cCst�|_d|_d|_dS)Nr)�_allocate_lock�_block�_owner�_count)�selfrrr �__init__asz_RLock.__init__cCs^|j}yt|j}Wntk r(YnXd|jj�r:dnd|jj|jj||j t t |��fS)Nz)<%s %s.%s object owner=%r count=%d at %s>�lockedZunlocked) r)�_active�name�KeyErrorr(r-� __class__� __module__� __qualname__r*�hex�id)r+�ownerrrr �__repr__fsz_RLock.__repr__T�cCsDt�}|j|kr"|jd7_dS|jj||�}|r@||_d|_|S)aAcquire a lock, blocking or non-blocking. When invoked without arguments: if this thread already owns the lock, increment the recursion level by one, and return immediately. Otherwise, if another thread owns the lock, block until the lock is unlocked. Once the lock is unlocked (not owned by any thread), then grab ownership, set the recursion level to one, and return. If more than one thread is blocked waiting until the lock is unlocked, only one at a time will be able to grab ownership of the lock. There is no return value in this case. When invoked with the blocking argument set to true, do the same thing as when called without arguments, and return true. When invoked with the blocking argument set to false, do not block. If a call without an argument would block, return false immediately; otherwise, do the same thing as when called without arguments, and return true. When invoked with the floating-point timeout argument set to a positive value, block for at most the number of seconds specified by timeout and as long as the lock cannot be acquired. Return true if the lock has been acquired, false if the timeout has elapsed. r8)rr)r*r(�acquire)r+�blocking�timeout�me�rcrrr r9us z_RLock.acquirecCs<|jt�krtd��|jd|_}|s8d|_|jj�dS)amRelease a lock, decrementing the recursion level. If after the decrement it is zero, reset the lock to unlocked (not owned by any thread), and if any other threads are blocked waiting for the lock to become unlocked, allow exactly one of them to proceed. If after the decrement the recursion level is still nonzero, the lock remains locked and owned by the calling thread. Only call this method when the calling thread owns the lock. A RuntimeError is raised if this method is called when the lock is unlocked. There is no return value. zcannot release un-acquired lockr8N)r)r� RuntimeErrorr*r(�release)r+rrrr r?�s  z_RLock.releasecCs |j�dS)N)r?)r+�t�v�tbrrr �__exit__�sz_RLock.__exit__cCs|jj�|\|_|_dS)N)r(r9r*r))r+�staterrr �_acquire_restore�s z_RLock._acquire_restorecCs<|jdkrtd��|j}d|_|j}d|_|jj�||fS)Nrzcannot release un-acquired lock)r*r>r)r(r?)r+rr6rrr � _release_save�s  z_RLock._release_savecCs |jt�kS)N)r)r)r+rrr � _is_owned�sz_RLock._is_ownedN���)TrH) �__name__r2r3�__doc__r,r7r9� __enter__r?rCrErFrGrrrr r&Ws $ r&c@steZdZdZddd�Zdd�Zdd�Zd d �Zd d �Zd d�Z dd�Z ddd�Z ddd�Z ddd�Z dd�ZeZdS)r ajClass that implements a condition variable. A condition variable allows one or more threads to wait until they are notified by another thread. If the lock argument is given and not None, it must be a Lock or RLock object, and it is used as the underlying lock. Otherwise, a new RLock object is created and used as the underlying lock. NcCs�|dkrt�}||_|j|_|j|_y |j|_Wntk rDYnXy |j|_Wntk rfYnXy |j|_Wntk r�YnXt�|_ dS)N) r�_lockr9r?rF�AttributeErrorrErG�_deque�_waiters)r+�lockrrr r,�s$   zCondition.__init__cCs |jj�S)N)rLrK)r+rrr rK�szCondition.__enter__cGs |jj|�S)N)rLrC)r+r$rrr rC�szCondition.__exit__cCsd|jt|j�fS)Nz<Condition(%s, %d)>)rL�lenrO)r+rrr r7�szCondition.__repr__cCs|jj�dS)N)rLr?)r+rrr rF�szCondition._release_savecCs|jj�dS)N)rLr9)r+�xrrr rE�szCondition._acquire_restorecCs"|jjd�r|jj�dSdSdS)NrFT)rLr9r?)r+rrr rG�s  zCondition._is_ownedcCs�|j�std��t�}|j�|jj|�|j�}d}z:|dkrN|j�d}n |dkrd|jd|�}n |jd�}|S|j|�|s�y|jj|�Wnt k r�YnXXdS)akWait until notified or until a timeout occurs. If the calling thread has not acquired the lock when this method is called, a RuntimeError is raised. This method releases the underlying lock, and then blocks until it is awakened by a notify() or notify_all() call for the same condition variable in another thread, or until the optional timeout occurs. Once awakened or timed out, it re-acquires the lock and returns. When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). When the underlying lock is an RLock, it is not released using its release() method, since this may not actually unlock the lock when it was acquired multiple times recursively. Instead, an internal interface of the RLock class is used, which really unlocks it even when it has been recursively acquired several times. Another internal interface is then used to restore the recursion level when the lock is reacquired. zcannot wait on un-acquired lockFNTr) rGr>r'r9rO�appendrFrE�remove� ValueError)r+r;�waiterZ saved_stateZgotitrrr �waits*   zCondition.waitcCs\d}|}|�}xH|sV|dk rD|dkr0t�|}n|t�}|dkrDP|j|�|�}qW|S)z�Wait until a condition evaluates to True. predicate should be a callable which result will be interpreted as a boolean value. A timeout may be provided giving the maximum time to wait. Nr)�_timerW)r+Z predicater;�endtimeZwaittime�resultrrr �wait_for7s    zCondition.wait_forr8c Csj|j�std��|j}tt||��}|s,dSx8|D]0}|j�y|j|�Wq2tk r`Yq2Xq2WdS)aKWake up one or more threads waiting on this condition, if any. If the calling thread has not acquired the lock when this method is called, a RuntimeError is raised. This method wakes up at most n of the threads waiting for the condition variable; it is a no-op if no threads are waiting. z!cannot notify on un-acquired lockN)rGr>rOrN�_islicer?rTrU)r+�nZ all_waitersZwaiters_to_notifyrVrrr �notifyNs  zCondition.notifycCs|jt|j��dS)z�Wake up all threads waiting on this condition. If the calling thread has not acquired the lock when this method is called, a RuntimeError is raised. N)r^rQrO)r+rrr � notify_alleszCondition.notify_all)N)N)N)r8)rIr2r3rJr,rKrCr7rFrErGrWr[r^r_Z notifyAllrrrr r �s   0   c@s8eZdZdZd dd�Zddd�ZeZd d �Zd d �ZdS)raGThis class implements semaphore objects. Semaphores manage a counter representing the number of release() calls minus the number of acquire() calls, plus an initial value. The acquire() method blocks if necessary until it can return without making the counter negative. If not given, value defaults to 1. r8cCs&|dkrtd��tt��|_||_dS)Nrz$semaphore initial value must be >= 0)rUr r�_cond�_value)r+�valuerrr r,}s zSemaphore.__init__TNc Cs�| r|dk rtd��d}d}|j�jxb|jdkrv|s8P|dk rh|dkrTt�|}n|t�}|dkrhP|jj|�q(W|jd8_d}WdQRX|S)a�Acquire a semaphore, decrementing the internal counter by one. When invoked without arguments: if the internal counter is larger than zero on entry, decrement it by one and return immediately. If it is zero on entry, block, waiting until some other thread has called release() to make it larger than zero. This is done with proper interlocking so that if multiple acquire() calls are blocked, release() will wake exactly one of them up. The implementation may pick one at random, so the order in which blocked threads are awakened should not be relied on. There is no return value in this case. When invoked with blocking set to true, do the same thing as when called without arguments, and return true. When invoked with blocking set to false, do not block. If a call without an argument would block, return false immediately; otherwise, do the same thing as when called without arguments, and return true. When invoked with a timeout other than None, it will block for at most timeout seconds. If acquire does not complete successfully in that interval, return false. Return true otherwise. Nz.can't specify timeout for non-blocking acquireFrr8T)rUr`rarXrW)r+r:r;r=rYrrr r9�s$   zSemaphore.acquirec Cs.|j�|jd7_|jj�WdQRXdS)z�Release a semaphore, incrementing the internal counter by one. When the counter is zero on entry and another thread is waiting for it to become larger than zero again, wake up that thread. r8N)r`rar^)r+rrr r?�szSemaphore.releasecCs |j�dS)N)r?)r+r@rArBrrr rC�szSemaphore.__exit__)r8)TN) rIr2r3rJr,r9rKr?rCrrrr rqs   - c@s"eZdZdZddd�Zdd�ZdS) ra�Implements a bounded semaphore. A bounded semaphore checks to make sure its current value doesn't exceed its initial value. If it does, ValueError is raised. In most situations semaphores are used to guard resources with limited capacity. If the semaphore is released too many times it's a sign of a bug. If not given, value defaults to 1. Like regular semaphores, bounded semaphores manage a counter representing the number of release() calls minus the number of acquire() calls, plus an initial value. The acquire() method blocks if necessary until it can return without making the counter negative. If not given, value defaults to 1. r8cCstj||�||_dS)N)rr,�_initial_value)r+rbrrr r,�s zBoundedSemaphore.__init__c CsB|j�2|j|jkrtd��|jd7_|jj�WdQRXdS)a6Release a semaphore, incrementing the internal counter by one. When the counter is zero on entry and another thread is waiting for it to become larger than zero again, wake up that thread. If the number of releases exceeds the number of acquires, raise a ValueError. z!Semaphore released too many timesr8N)r`rarcrUr^)r+rrr r?�s  zBoundedSemaphore.releaseN)r8)rIr2r3rJr,r?rrrr r�s c@sFeZdZdZdd�Zdd�Zdd�ZeZdd �Zd d �Z dd d�Z d S)rz�Class implementing event objects. Events manage a flag that can be set to true with the set() method and reset to false with the clear() method. The wait() method blocks until the flag is true. The flag is initially false. cCstt��|_d|_dS)NF)r rr`�_flag)r+rrr r,�s zEvent.__init__cCs|jjt��dS)N)r`r,r)r+rrr �_reset_internal_locks�szEvent._reset_internal_lockscCs|jS)z5Return true if and only if the internal flag is true.)rd)r+rrr �is_set�sz Event.is_setc Cs&|j�d|_|jj�WdQRXdS)z�Set the internal flag to true. All threads waiting for it to become true are awakened. Threads that call wait() once the flag is true will not block at all. TN)r`rdr_)r+rrr �setsz Event.setc Cs|j� d|_WdQRXdS)z�Reset the internal flag to false. Subsequently, threads calling wait() will block until set() is called to set the internal flag to true again. FN)r`rd)r+rrr �clear sz Event.clearNc Cs,|j�|j}|s|jj|�}|SQRXdS)aHBlock until the internal flag is true. If the internal flag is true on entry, return immediately. Otherwise, block until another thread calls set() to set the flag to true, or until the optional timeout occurs. When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). This method returns the internal flag on exit, so it will always return True except if a timeout is given and the operation times out. N)r`rdrW)r+r;Zsignaledrrr rWs  z Event.wait)N) rIr2r3rJr,rerfZisSetrgrhrWrrrr r�s  c@s�eZdZdZddd�Zddd�Zdd�Zd d �Zd d �Zd d�Z dd�Z dd�Z dd�Z e dd��Ze dd��Ze dd��ZdS)rz�Implements a Barrier. Useful for synchronizing a fixed number of threads at known synchronization points. Threads block on 'wait()' and are simultaneously once they have all made that call. NcCs.tt��|_||_||_||_d|_d|_dS)aWCreate a barrier, initialised to 'parties' threads. 'action' is a callable which, when supplied, will be called by one of the threads after they have all entered the barrier and just prior to releasing them all. If a 'timeout' is provided, it is uses as the default for all subsequent 'wait()' calls. rN)r rr`�_action�_timeout�_parties�_stater*)r+�parties�actionr;rrr r,?s zBarrier.__init__cCs�|dkr|j}|j�b|j�|j}|jd7_z&|d|jkrL|j�n |j|�|S|jd8_|j�XWdQRXdS)aNWait for the barrier. When the specified number of threads have started waiting, they are all simultaneously awoken. If an 'action' was provided for the barrier, one of the threads will have executed that callback prior to returning. Returns an individual index number from 0 to 'parties-1'. Nr8)rjr`�_enterr*rk�_release�_wait�_exit)r+r;�indexrrr rWOs   z Barrier.waitcCs:x|jdkr|jj�qW|jdkr(t�|jdks6t�dS)Nr8rrH)rHr8)rlr`rWr�AssertionError)r+rrr roms   zBarrier._enterc Cs>y"|jr|j�d|_|jj�Wn|j��YnXdS)Nr8)rirlr`r_�_break)r+rrr rpxszBarrier._releasecsB�jj�fdd�|�s"�j�t��jdkr0t��jdks>t�dS)Ncs �jdkS)Nr)rlr)r+rr �<lambda>�szBarrier._wait.<locals>.<lambda>rr8)r`r[rurrlrt)r+r;r)r+r rq�s  z Barrier._waitcCs(|jdkr$|jdkr$d|_|jj�dS)Nrr8rH)rHr8)r*rlr`r_)r+rrr rr�s  z Barrier._exitc CsT|j�D|jdkr6|jdkr$d|_q<|jdkr<d|_nd|_|jj�WdQRXdS)z�Reset the barrier to the initial state. Any threads currently waiting will get the BrokenBarrier exception raised. rr8�NrH���rH)r`r*rlr_)r+rrr �reset�s   z Barrier.resetc Cs|j�|j�WdQRXdS)z�Place the barrier into a 'broken' state. Useful in case of error. Any currently waiting threads and threads attempting to 'wait()' will have BrokenBarrierError raised. N)r`ru)r+rrr �abort�sz Barrier.abortcCsd|_|jj�dS)Nrwrx)rlr`r_)r+rrr ru�szBarrier._breakcCs|jS)z:Return the number of threads required to trip the barrier.)rk)r+rrr rm�szBarrier.partiescCs|jdkr|jSdS)z>Return the number of threads currently waiting at the barrier.r)rlr*)r+rrr � n_waiting�s zBarrier.n_waitingcCs |jdkS)z0Return True if the barrier is in a broken state.rwrx)rl)r+rrr �broken�szBarrier.broken)NN)N)rIr2r3rJr,rWrorprqrrryrzru�propertyrmr{r|rrrr r6s       c@s eZdZdS)rN)rIr2r3rrrr r�s� Thread-%dcCs |t�S)N)�_counter)�templaterrr �_newname�sr�c@seZdZdZdZejZdddfdfdd�dd�Zdd�Z d d �Z d d �Z d d�Z dd�Z dd�Zdd�Zdd�Zdd�Zdd�Zd3dd�Zd5dd �Zed!d"��Zejd#d"��Zed$d%��Zd&d'�ZeZed(d)��Zejd*d)��Zd+d,�Zd-d.�Zd/d0�Zd1d2�ZdS)6raA class that represents a thread of control. This class can be safely subclassed in a limited fashion. There are two ways to specify the activity: by passing a callable object to the constructor, or by overriding the run() method in a subclass. FN)�daemoncCs�|dkstd��|dkri}||_t|p,t��|_||_||_|dk rN||_n t�j |_d|_ d|_ t �|_ d|_d|_tj|_tj|�dS)aKThis constructor should always be called with keyword arguments. Arguments are: *group* should be None; reserved for future extension when a ThreadGroup class is implemented. *target* is the callable object to be invoked by the run() method. Defaults to None, meaning nothing is called. *name* is the thread name. By default, a unique name is constructed of the form "Thread-N" where N is a small decimal number. *args* is the argument tuple for the target invocation. Defaults to (). *kwargs* is a dictionary of keyword arguments for the target invocation. Defaults to {}. If a subclass overrides the constructor, it must make sure to invoke the base class constructor (Thread.__init__()) before doing anything else to the thread. Nz#group argument must be None for nowFT)rt�_target�strr��_name�_args�_kwargs� _daemonicr r��_ident� _tstate_lockr�_started� _is_stopped� _initialized�_sys�stderr�_stderr� _dangling�add)r+�group�targetr/r$r%r�rrr r,�s" zThread.__init__cCs(|jj�|r|j�n d|_d|_dS)NT)r�re�_set_tstate_lockr�r�)r+�is_aliverrr re"s   zThread._reset_internal_lockscCsl|jstd��d}|jj�r d}|j�|jr2d}|jr@|d7}|jdk rX|d|j7}d|jj |j |fS)Nz Thread.__init__() was not called�initialZstartedZstoppedz daemonz %sz <%s(%s, %s)>) r�rtr�rfr�r�r�r�r1rIr�)r+Zstatusrrr r7.s  zThread.__repr__cCs�|jstd��|jj�r td��t�|t|<WdQRXyt|jf�Wn,tk rtt� t|=WdQRX�YnX|jj �dS)a-Start the thread's activity. It must be called at most once per thread object. It arranges for the object's run() method to be invoked in a separate thread of control. This method will raise a RuntimeError if called more than once on the same thread object. zthread.__init__() not calledz threads can only be started onceN) r�r>r�rf�_active_limbo_lock�_limbo�_start_new_thread� _bootstrap� ExceptionrW)r+rrr �start<s  z Thread.startc Cs.z|jr|j|j|j�Wd|`|`|`XdS)aXMethod representing the thread's activity. You may override this method in a subclass. The standard run() method invokes the callable object passed to the object's constructor as the target argument, if any, with sequential and keyword arguments taken from the args and kwargs arguments, respectively. N)r�r�r�)r+rrr �runUs z Thread.runc Cs2y |j�Wn |jr&tdkr&dS�YnXdS)N)�_bootstrap_innerr�r�)r+rrr r�fs  zThread._bootstrapcCs t�|_dS)N)rr�)r+rrr � _set_identzszThread._set_identcCst�|_|jj�dS)z� Set a lock object which will be released by the interpreter when the underlying thread state (see pystate.h) gets deleted. N)� _set_sentinelr�r9)r+rrr r�}szThread._set_tstate_lockc2Cs��zT|j�|j�|jj�t�|t|j<t|=WdQRXtrLt j t�t rZt j t �z�y |j �Wn�tk r|Yn�t r�t jdk r�td|jt�ft jd�n�|jdk �rH|j�\}}}zxtd|jd|jd�td|jd�x6|�r$td|jjj|j|jjjf|jd�|j}q�Wtd||f|jd�Wd~~~XYnXWdXWdt� y tt�=Wn YnXWdQRXXdS)NzException in thread %s: %s)�filezException in thread z2 (most likely raised during interpreter shutdown):z"Traceback (most recent call last):z File "%s", line %s, in %sz%s: %s)r�r�r�rgr�r.r�r�r!r�rrrr�� SystemExitr��printr/� _format_excr�� _exc_info�tb_frame�f_code� co_filename� tb_lineno�co_name�tb_nextr)r+�exc_type� exc_valueZexc_tbrrr r��sT         zThread._bootstrap_innercCs,|j}|dk r|j� st�d|_d|_dS)NT)r�r-rtr�)r+rPrrr �_stop�s z Thread._stopcCsByt�tt�=WdQRXWn tk r<dtjkr8�YnXdS)zARemove current thread from the dict of currently running threads.NZdummy_threading)r�r.rr0r��modules)r+rrr �_delete�s  zThread._deletecCsZ|jstd��|jj�s td��|t�kr2td��|dkrD|j�n|jt|d�d�dS)aWait until the thread terminates. This blocks the calling thread until the thread whose join() method is called terminates -- either normally or through an unhandled exception or until the optional timeout occurs. When the timeout argument is present and not None, it should be a floating point number specifying a timeout for the operation in seconds (or fractions thereof). As join() always returns None, you must call isAlive() after join() to decide whether a timeout happened -- if the thread is still alive, the join() call timed out. When the timeout argument is not present or None, the operation will block until the thread terminates. A thread can be join()ed many times. join() raises a RuntimeError if an attempt is made to join the current thread as that would cause a deadlock. It is also an error to join() a thread before it has been started and attempts to do so raises the same exception. zThread.__init__() not calledz'cannot join thread before it is startedzcannot join current threadNr)r;)r�r>r�rfr �_wait_for_tstate_lock�max)r+r;rrr �joins   z Thread.joinTr8cCs:|j}|dkr|js6t�n|j||�r6|j�|j�dS)N)r�r�rtr9r?r�)r+�blockr;rPrrr r�&s   zThread._wait_for_tstate_lockcCs|jstd��|jS)z�A string used for identification purposes only. It has no semantics. Multiple threads may be given the same name. The initial name is set by the constructor. zThread.__init__() not called)r�rtr�)r+rrr r/4sz Thread.namecCs|jstd��t|�|_dS)NzThread.__init__() not called)r�rtr�r�)r+r/rrr r/?scCs|jstd��|jS)a4Thread identifier of this thread or None if it has not been started. This is a nonzero integer. See the get_ident() function. Thread identifiers may be recycled when a thread exits and another thread is created. The identifier is available even after the thread has exited. zThread.__init__() not called)r�rtr�)r+rrr �identDs z Thread.identcCs6|jstd��|js |jj� r$dS|jd�|j S)z�Return whether the thread is alive. This method returns True just before the run() method starts until just after the run() method terminates. The module function enumerate() returns a list of all alive threads. zThread.__init__() not calledF)r�rtr�r�rfr�)r+rrr r�Ps  zThread.is_alivecCs|jstd��|jS)a�A boolean value indicating whether this thread is a daemon thread. This must be set before start() is called, otherwise RuntimeError is raised. Its initial value is inherited from the creating thread; the main thread is not a daemon thread and therefore all threads created in the main thread default to daemon = False. The entire Python program exits when no alive non-daemon threads are left. zThread.__init__() not called)r�rtr�)r+rrr r�`s z Thread.daemoncCs*|jstd��|jj�r td��||_dS)NzThread.__init__() not calledz)cannot set daemon status of active thread)r�r>r�rfr�)r+�daemonicrrr r�ps  cCs|jS)N)r�)r+rrr �isDaemonxszThread.isDaemoncCs ||_dS)N)r�)r+r�rrr � setDaemon{szThread.setDaemoncCs|jS)N)r/)r+rrr �getName~szThread.getNamecCs ||_dS)N)r/)r+r/rrr �setName�szThread.setName)NrH)TrH) rIr2r3rJr�r��exc_infor�r,rer7r�r�r�r�r�r�r�r�r�r�r}r/�setterr�r�ZisAliver�r�r�r�r�rrrr r�s8, A# &    c@s*eZdZdZd dd�Zdd�Zdd�ZdS) rz�Call a function after a specified number of seconds: t = Timer(30.0, f, args=None, kwargs=None) t.start() t.cancel() # stop the timer's action if it's still waiting NcCsFtj|�||_||_|dk r"|ng|_|dk r4|ni|_t�|_dS)N)rr,�interval�functionr$r%r�finished)r+r�r�r$r%rrr r,�s  zTimer.__init__cCs|jj�dS)z)Stop the timer if it hasn't finished yet.N)r�rg)r+rrr �cancel�sz Timer.cancelcCs6|jj|j�|jj�s(|j|j|j�|jj�dS)N)r�rWr�rfr�r$r%rg)r+rrr r��s z Timer.run)NN)rIr2r3rJr,r�r�rrrr r�s c@seZdZdd�ZdS)� _MainThreadc CsHtj|ddd�|j�|jj�|j�t�|t|j<WdQRXdS)NZ MainThreadF)r/r�) rr,r�r�rgr�r�r.r�)r+rrr r,�s  z_MainThread.__init__N)rIr2r3r,rrrr r��sr�c@s.eZdZdd�Zdd�Zdd�Zd dd �ZdS) � _DummyThreadc CsDtj|td�dd�|jj�|j�t�|t|j<WdQRXdS)NzDummy-%dT)r/r�) rr,r�r�rgr�r�r.r�)r+rrr r,�s  z_DummyThread.__init__cCsdS)Nr)r+rrr r��sz_DummyThread._stopcCs|j r|jj�st�dS)NT)r�r�rfrt)r+rrr r��sz_DummyThread.is_aliveNcCsds td��dS)NFzcannot join a dummy thread)rt)r+r;rrr r��sz_DummyThread.join)N)rIr2r3r,r�r�r�rrrr r��sr�c Cs&y tt�Stk r t�SXdS)z�Return the current Thread object, corresponding to the caller's thread of control. If the caller's thread of control was not created through the threading module, a dummy thread object with limited functionality is returned. N)r.rr0r�rrrr r �s c Cs t�tt�tt�SQRXdS)z�Return the number of Thread objects currently alive. The returned count is equal to the length of the list returned by enumerate(). N)r�rQr.r�rrrr r �scCsttj��ttj��S)N)�listr.�valuesr�rrrr � _enumerate�sr�c Cs(t�ttj��ttj��SQRXdS)z�Return a list of all Thread objects currently alive. The list includes daemonic threads, dummy thread objects created by current_thread(), and the main thread. It excludes terminated threads and threads that have not yet been started. N)r�r�r.r�r�rrrr r �s)rcCsPtj}|dk st�|j�st�|j�tj�t�}x|rJ|j�t�}q6WdS)N)� _main_threadr�rtr-r?r��_pickSomeNonDaemonThreadr�)Ztlockr@rrr � _shutdown�s  r�cCs(x"t�D]}|j r|j�r|SqWdS)N)r r�r�)r@rrr r�s r�cCstS)z�Return the main thread object. In normal conditions, the main thread is the thread from which the Python interpreter was started. )r�rrrr r s)�_local)rc Cs�t�ai}t�}|at��tt��}|jt�xF|D]>}||kr`|jd�t �}||_ |||<q4|jd�|j �q4Wt j �tj �tj|�tt�dks�t�WdQRXdS)NTFr8)r'r�r r�rgr��updater�rerr�r�r�rhr.rQrt)Z new_activeZcurrentZthreadsZthreadr�rrr � _after_fork(s&        r�)r~)KrJ�sysr��_threadZtimerrX� tracebackrr�� _weakrefsetr� itertoolsrr\rr*� _collectionsrrN� ImportError� collections�__all__�start_new_threadr�� allocate_lockr'r�r�errorrrr"rMrrr!rrrr&r#r rrrrr>r�__next__rr�r�r.r�r�rrr�r�r Z currentThreadr Z activeCountr�r rr�r�r�r r�rZ_threading_localr�rrrr �<module>s�           q'P&O '