AlkantarClanX12

Your IP : 18.188.205.95


Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/threading.cpython-33.pyc

�
��fI�c@sdZddlZddlZddlmZyddlmZWn"e	k
rfddlmZYnXddl
mZddl
mZdd	d
ddd
dddddddddddgZejZejZejZejZy
ejZWnek
reZYnXejZ[eaeadd�Zdd�ZeZ dd�ZGdd�d�Z!e!Z"Gdd	�d	�Z#Gdd�d�Z$Gd d�de$�Z%Gd!d�d�Z&Gd"d�d�Z'Gd#d$�d$e(�Z)da*d%d&d'�Z+e�a,iZ-iZ.e�Z/Gd(d�d�Z0Gd)d�de0�Z1Gd*d+�d+e0�Z2d,d-�Z3Gd.d/�d/e0�Z4d0d
�Z5e5Z6d1d�Z7e7Z8d2d3�Z9d4d�Z:dd5lm;Z;e2�j<Z=ydd6lm>Z?Wn"e	k
rdd7l@m?Z?YnXd8d9�ZAdS(:u;Thread module emulating a subset of Java's threading model.iN(usleep(u	monotonic(utime(u
format_exc(uWeakSetuactive_countu	Conditionucurrent_threadu	enumerateuEventuLockuRLocku	SemaphoreuBoundedSemaphoreuThreaduBarrieruTimeruThreadErroru
setprofileusettraceulocalu
stack_sizecCs
|adS(u�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(u
_profile_hook(ufunc((u./opt/alt/python33/lib64/python3.3/threading.pyu
setprofile.scCs
|adS(u�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(u_trace_hook(ufunc((u./opt/alt/python33/lib64/python3.3/threading.pyusettrace8scOs&tdkrt||�St||�S(u2Factory 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(u_CRLockuNoneu_PyRLock(uargsukwargs((u./opt/alt/python33/lib64/python3.3/threading.pyuRLockFs	
cBs�|EeZdZdZdd�Zdd�Zdddd�ZeZd	d
�Z	dd�Z
d
d�Zdd�Zdd�Z
dS(u_RLocku,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.

    cCs"t�|_d|_d|_dS(Ni(u_allocate_locku_blockuNoneu_owneru_count(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__]s	u_RLock.__init__cCsI|j}yt|j}Wntk
r.YnXd|jj||jfS(Nu<%s owner=%r count=%d>(u_owneru_activeunameuKeyErroru	__class__u__name__u_count(uselfuowner((u./opt/alt/python33/lib64/python3.3/threading.pyu__repr__bs	
u_RLock.__repr__icCs`t�}|j|kr,|jd|_dS|jj||�}|r\||_d|_n|S(uAcquire 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.

        i(u	get_identu_owneru_countu_blockuacquire(uselfublockingutimeoutumeurc((u./opt/alt/python33/lib64/python3.3/threading.pyuacquireks		u_RLock.acquirecCsX|jt�kr!td��n|jd|_}|sTd|_|jj�ndS(umRelease 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.

        ucannot release un-acquired lockiN(u_owneru	get_identuRuntimeErroru_countuNoneu_blockurelease(uselfucount((u./opt/alt/python33/lib64/python3.3/threading.pyurelease�s	u_RLock.releasecCs|j�dS(N(urelease(uselfutuvutb((u./opt/alt/python33/lib64/python3.3/threading.pyu__exit__�su_RLock.__exit__cCs#|jj�|\|_|_dS(N(u_blockuacquireu_countu_owner(uselfustate((u./opt/alt/python33/lib64/python3.3/threading.pyu_acquire_restore�s
u_RLock._acquire_restorecCsY|jdkrtd��n|j}d|_|j}d|_|jj�||fS(Niucannot release un-acquired lock(u_countuRuntimeErroru_owneruNoneu_blockurelease(uselfucountuowner((u./opt/alt/python33/lib64/python3.3/threading.pyu
_release_save�s				
u_RLock._release_savecCs|jt�kS(N(u_owneru	get_ident(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu	_is_owned�su_RLock._is_ownedNTi����(u__name__u
__module__u__qualname__u__doc__u__init__u__repr__uTrueuacquireu	__enter__ureleaseu__exit__u_acquire_restoreu
_release_saveu	_is_owned(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyu_RLockSs	$
u_RLockcBs�|EeZdZdZddd�Zdd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zddd�Zddd�Z
ddd�Zdd�ZeZdS(u	ConditionujClass 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.

    cCs�|dkrt�}n||_|j|_|j|_y|j|_Wntk
r]YnXy|j|_Wntk
r�YnXy|j|_Wntk
r�YnXg|_	dS(N(
uNoneuRLocku_lockuacquireureleaseu
_release_saveuAttributeErroru_acquire_restoreu	_is_ownedu_waiters(uselfulock((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__�s$	


uCondition.__init__cCs
|jj�S(N(u_locku	__enter__(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu	__enter__�suCondition.__enter__cGs|jj|�S(N(u_locku__exit__(uselfuargs((u./opt/alt/python33/lib64/python3.3/threading.pyu__exit__�suCondition.__exit__cCsd|jt|j�fS(Nu<Condition(%s, %d)>(u_lockulenu_waiters(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu__repr__�suCondition.__repr__cCs|jj�dS(N(u_lockurelease(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu
_release_save�suCondition._release_savecCs|jj�dS(N(u_lockuacquire(uselfux((u./opt/alt/python33/lib64/python3.3/threading.pyu_acquire_restore�suCondition._acquire_restorecCs+|jjd�r#|jj�dSdSdS(NiFT(u_lockuacquireureleaseuFalseuTrue(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu	_is_owned�s
uCondition._is_ownedcCs�|j�std��nt�}|j�|jj|�|j�}z�|dkrl|j�d}nb|dkr�|jd|�}n|jd�}|s�y|jj
|�Wq�tk
r�Yq�Xn|SWd|j|�XdS(ukWait 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.

        ucannot wait on un-acquired lockiNTF(
u	_is_owneduRuntimeErroru_allocate_lockuacquireu_waitersuappendu
_release_saveuNoneuTrueuFalseuremoveu
ValueErroru_acquire_restore(uselfutimeoutuwaiterusaved_stateugotit((u./opt/alt/python33/lib64/python3.3/threading.pyuwait�s(	

	
uCondition.waitcCs�d}|}|�}xh|s|dk	rf|dkrFt�|}qf|t�}|dkrfPqfn|j|�|�}qW|S(u�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.

        iN(uNoneu_timeuwait(uselfu	predicateutimeoutuendtimeuwaittimeuresult((u./opt/alt/python33/lib64/python3.3/threading.pyuwait_for,s		


uCondition.wait_foricCs�|j�std��n|j}|d|�}|s>dSx>|D]6}|j�y|j|�WqEtk
rzYqEXqEWdS(uKWake 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.

        u!cannot notify on un-acquired lockN(u	_is_owneduRuntimeErroru_waitersureleaseuremoveu
ValueError(uselfunu_Condition__waitersuwaitersuwaiter((u./opt/alt/python33/lib64/python3.3/threading.pyunotifyCs
	


uCondition.notifycCs|jt|j��dS(u�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(unotifyulenu_waiters(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu
notify_allZsuCondition.notify_allN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__u	__enter__u__exit__u__repr__u
_release_saveu_acquire_restoreu	_is_owneduwaituwait_forunotifyu
notify_allu	notifyAll(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyu	Condition�s
	/	cBsY|EeZdZdZddd�Zdddd�ZeZdd�Z	d	d
�Z
dS(
u	SemaphoreuGThis 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.

    icCs:|dkrtd��ntt��|_||_dS(Niu$semaphore initial value must be >= 0(u
ValueErroru	ConditionuLocku_condu_value(uselfuvalue((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__rsuSemaphore.__init__c
Cs�|r"|dk	r"td��nd}d}|j��x�|jdkr�|sTPn|dk	r�|dkr|t�|}q�|t�}|dkr�Pq�n|jj|�q;W|jd|_d}WdQX|S(u�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.

        u.can't specify timeout for non-blocking acquireiiNFT(uNoneu
ValueErroruFalseu_condu_valueu_timeuwaituTrue(uselfublockingutimeouturcuendtime((u./opt/alt/python33/lib64/python3.3/threading.pyuacquirexs$

uSemaphore.acquirec	Cs1|j�"|jd|_|jj�WdQXdS(u�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.

        iN(u_condu_valueunotify(uself((u./opt/alt/python33/lib64/python3.3/threading.pyurelease�s
uSemaphore.releasecCs|j�dS(N(urelease(uselfutuvutb((u./opt/alt/python33/lib64/python3.3/threading.pyu__exit__�suSemaphore.__exit__NT(u__name__u
__module__u__qualname__u__doc__u__init__uTrueuNoneuacquireu	__enter__ureleaseu__exit__(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyu	Semaphorefs-cBs5|EeZdZdZddd�Zdd�ZdS(uBoundedSemaphoreu�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.

    icCstj||�||_dS(N(u	Semaphoreu__init__u_initial_value(uselfuvalue((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__�suBoundedSemaphore.__init__c
CsQ|j�B|j|jkr+td��n|jd7_|jj�WdQXdS(u6Release 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.

        u!Semaphore released too many timesiN(u_condu_valueu_initial_valueu
ValueErrorunotify(uself((u./opt/alt/python33/lib64/python3.3/threading.pyurelease�s


uBoundedSemaphore.releaseN(u__name__u
__module__u__qualname__u__doc__u__init__urelease(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuBoundedSemaphore�scBsk|EeZdZdZdd�Zdd�Zdd�ZeZdd	�Zd
d�Z	ddd
�ZdS(uEventu�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(u	ConditionuLocku_conduFalseu_flag(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__�suEvent.__init__cCs|jj�dS(N(u_condu__init__(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_reset_internal_locks�suEvent._reset_internal_lockscCs|jS(u5Return true if and only if the internal flag is true.(u_flag(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuis_set�suEvent.is_setc
Cs<|jj�zd|_|jj�Wd|jj�XdS(u�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.

        NT(u_conduacquireuTrueu_flagu
notify_allurelease(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuset�s

	u	Event.setc
Cs/|jj�z
d|_Wd|jj�XdS(u�Reset the internal flag to false.

        Subsequently, threads calling wait() will block until set() is called to
        set the internal flag to true again.

        NF(u_conduacquireuFalseu_flagurelease(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuclears

uEvent.clearc
CsN|jj�z,|j}|s4|jj|�}n|SWd|jj�XdS(uHBlock 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(u_conduacquireu_flaguwaiturelease(uselfutimeoutusignaled((u./opt/alt/python33/lib64/python3.3/threading.pyuwaits
	u
Event.waitN(u__name__u
__module__u__qualname__u__doc__u__init__u_reset_internal_locksuis_setuisSetusetuclearuNoneuwait(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuEvent�s
cBs�|EeZdZdZdddd�Zddd�Zdd�Zdd	�Zd
d�Z	dd
�Z
dd�Zdd�Zdd�Z
edd��Zedd��Zedd��ZdS(uBarrieru�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.

    cCsCtt��|_||_||_||_d|_d|_dS(uWCreate 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.

        iN(u	ConditionuLocku_condu_actionu_timeoutu_partiesu_stateu_count(uselfupartiesuactionutimeout((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__=s					uBarrier.__init__cCs�|dkr|j}n|j�y|j�|j}|jd7_z5|d|jkrg|j�n
|j|�|SWd|jd8_|j�XWdQXdS(uNWait 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'.

        iN(	uNoneu_timeoutu_condu_enteru_countu_partiesu_releaseu_waitu_exit(uselfutimeoutuindex((u./opt/alt/python33/lib64/python3.3/threading.pyuwaitMs	

	

uBarrier.waitcCsTx |jdkr"|jj�qW|jdkr;t�n|jdksPt�dS(Niii����(i����i(u_stateu_conduwaituBrokenBarrierErroruAssertionError(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_enterks
	uBarrier._enterc	CsLy0|jr|j�nd|_|jj�Wn|j��YnXdS(Ni(u_actionu_stateu_condu
notify_allu_break(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_releasevs	
	
uBarrier._releasecse�jj�fdd�|�s4�j�t�n�jdkrLt�n�jdksat�dS(Ncs
�jdkS(Ni(u_state((uself(u./opt/alt/python33/lib64/python3.3/threading.pyu<lambda>�suBarrier._wait.<locals>.<lambda>ii(u_conduwait_foru_breakuBrokenBarrierErroru_stateuAssertionError(uselfutimeout((uselfu./opt/alt/python33/lib64/python3.3/threading.pyu_wait�s!
		u
Barrier._waitcCs>|jdkr:|jdkr:d|_|jj�q:ndS(Niii����(i����i(u_countu_stateu_condu
notify_all(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_exit�s	u
Barrier._exitc	Csr|j�c|jdkrR|jdkr4d|_q[|jdkr[d|_q[n	d|_|jj�WdQXdS(u�Reset the barrier to the initial state.

        Any threads currently waiting will get the BrokenBarrier exception
        raised.

        iiiNi����i����i����(u_condu_countu_stateu
notify_all(uself((u./opt/alt/python33/lib64/python3.3/threading.pyureset�s
	u
Barrier.resetcCs|j�|j�WdQXdS(u�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(u_condu_break(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuabort�s
u
Barrier.abortcCsd|_|jj�dS(Nii����(u_stateu_condu
notify_all(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_break�s	uBarrier._breakcCs|jS(u:Return the number of threads required to trip the barrier.(u_parties(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuparties�suBarrier.partiescCs|jdkr|jSdS(u>Return the number of threads currently waiting at the barrier.i(u_stateu_count(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu	n_waiting�suBarrier.n_waitingcCs
|jdkS(u0Return True if the barrier is in a broken state.ii����(u_state(uself((u./opt/alt/python33/lib64/python3.3/threading.pyubroken�suBarrier.brokenN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__uwaitu_enteru_releaseu_waitu_exituresetuabortu_breakupropertyupartiesu	n_waitingubroken(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuBarrier4s
	cBs|EeZdZdS(uBrokenBarrierErrorN(u__name__u
__module__u__qualname__(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuBrokenBarrierError�suBrokenBarrierErroru	Thread-%dcCstda|tS(Ni(u_counter(utemplate((u./opt/alt/python33/lib64/python3.3/threading.pyu_newname�s
u_newnamec	Bsg|EeZdZdZd,ZejZdd+d+d+d+fd+dd�Z
dd�Zdd�Zd	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zd+dd�Zedd��Zejdd��Zedd��Zdd�ZeZed d!��Zejd"d!��Zd#d$�Zd%d&�Zd'd(�Zd)d*�Zd+S(-uThreaduA 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.

    udaemoncCs�|dkstd��|dkr-i}n||_t|pEt��|_||_||_|dk	rx||_nt	�j
|_d|_t�|_
d|_tt��|_d|_tj|_tj|�dS(uKThis 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.

        u#group argument must be None for nowNFT(uNoneuAssertionErroru_targetustru_newnameu_nameu_argsu_kwargsu	_daemonicucurrent_threadudaemonu_identuEventu_starteduFalseu_stoppedu	ConditionuLocku_blockuTrueu_initializedu_sysustderru_stderru	_danglinguadd(uselfugrouputargetunameuargsukwargsudaemon((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__�s"							uThread.__init__cCs0t|d�r|jj�n|jj�dS(Nu_block(uhasattru_blocku__init__u_startedu_reset_internal_locks(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_reset_internal_locks"suThread._reset_internal_lockscCs�|jstd��d}|jj�r3d}n|jrEd}n|jr[|d7}n|jdk	r~|d|j7}nd|jj	|j
|fS(Nu Thread.__init__() was not calleduinitialustartedustoppedu daemonu %su<%s(%s, %s)>(u_initializeduAssertionErroru_starteduis_setu_stoppedu	_daemonicu_identuNoneu	__class__u__name__u_name(uselfustatus((u./opt/alt/python33/lib64/python3.3/threading.pyu__repr__)s				
uThread.__repr__cCs�|jstd��n|jj�r6td��nt�|t|<WdQXyt|jf�Wn)tk
r�t�t|=WdQX�YnX|jj	�dS(u-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.

        uthread.__init__() not calledu threads can only be started onceN(
u_initializeduRuntimeErroru_starteduis_setu_active_limbo_locku_limbou_start_new_threadu
_bootstrapu	Exceptionuwait(uself((u./opt/alt/python33/lib64/python3.3/threading.pyustart6s
	

uThread.startc
Cs@z&|jr%|j|j|j�nWd|`|`|`XdS(uXMethod 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(u_targetu_argsu_kwargs(uself((u./opt/alt/python33/lib64/python3.3/threading.pyurunOs		u
Thread.runc	Cs9y|j�Wn$|jr-tdkr-dS�YnXdS(N(u_bootstrap_inneru	_daemonicu_sysuNone(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu
_bootstrap`s
uThread._bootstrapcCst�|_dS(N(u	get_identu_ident(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu
_set_identtsuThread._set_identc1Cs�z�|j�|jj�t�|t|j<t|=WdQXtrQtj	t�nt
rgtjt
�nzy|j�Wnt
k
r�Yn�tr�tjjd|jt�f�n�|j�\}}}z�td|jdd|j�tdd|j�xH|rKtd|jjj|j|jjjfd|j�|j}qWtd||fd|j�Wd~~~XYnXWdXWdt�(|j�ytt�=WnYnXWdQXXdS(NuException in thread %s:
%s
uException in thread u2 (most likely raised during interpreter shutdown):ufileu"Traceback (most recent call last):u  File "%s", line %s, in %su%s: %s(u
_set_identu_startedusetu_active_limbo_locku_activeu_identu_limbou_trace_hooku_sysusettraceu
_profile_hooku
setprofileurunu
SystemExitustderruwriteunameu_format_excu	_exc_infouprintu_stderrutb_frameuf_codeuco_filenameu	tb_linenouco_nameutb_nextu_stopu	get_ident(uselfuexc_typeu	exc_valueuexc_tb((u./opt/alt/python33/lib64/python3.3/threading.pyu_bootstrap_innerwsR





	
!
uThread._bootstrap_innercCs4|jj�d|_|jj�|jj�dS(NT(u_blockuacquireuTrueu_stoppedu
notify_allurelease(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_stop�s
	
uThread._stopcCsIyt�tt�=WdQXWn'tk
rDdtjkr@�nYnXdS(uARemove current thread from the dict of currently running threads.Nudummy_threading(u_active_limbo_locku_activeu	get_identuKeyErroru_sysumodules(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_delete�s
uThread._deletec
Cs�|jstd��n|jj�s6td��n|t�krTtd��n|jj�zz|dkr�xg|js�|jj	�qsWnJt
�|}x:|js�|t
�}|dkr�Pn|jj	|�q�WWd|jj�XdS(uWait 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.

        uThread.__init__() not calledu'cannot join thread before it is starteducannot join current threadiN(u_initializeduRuntimeErroru_starteduis_setucurrent_threadu_blockuacquireuNoneu_stoppeduwaitu_timeurelease(uselfutimeoutudeadlineudelay((u./opt/alt/python33/lib64/python3.3/threading.pyujoin�s$	


uThread.joincCs|jstd��|jS(u�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.

        uThread.__init__() not called(u_initializeduAssertionErroru_name(uself((u./opt/alt/python33/lib64/python3.3/threading.pyunamesuThread.namecCs(|jstd��t|�|_dS(NuThread.__init__() not called(u_initializeduAssertionErrorustru_name(uselfuname((u./opt/alt/python33/lib64/python3.3/threading.pyunamescCs|jstd��|jS(u;Thread identifier of this thread or None if it has not been started.

        This is a nonzero integer. See the thread.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.

        uThread.__init__() not called(u_initializeduAssertionErroru_ident(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuidents	uThread.identcCs,|jstd��|jj�o+|jS(u�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.

        uThread.__init__() not called(u_initializeduAssertionErroru_starteduis_setu_stopped(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuis_alive+suThread.is_alivecCs|jstd��|jS(u�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.

        uThread.__init__() not called(u_initializeduAssertionErroru	_daemonic(uself((u./opt/alt/python33/lib64/python3.3/threading.pyudaemon8s
u
Thread.daemoncCsC|jstd��n|jj�r6td��n||_dS(NuThread.__init__() not calledu)cannot set daemon status of active thread(u_initializeduRuntimeErroru_starteduis_setu	_daemonic(uselfudaemonic((u./opt/alt/python33/lib64/python3.3/threading.pyudaemonHs
	cCs|jS(N(udaemon(uself((u./opt/alt/python33/lib64/python3.3/threading.pyuisDaemonPsuThread.isDaemoncCs
||_dS(N(udaemon(uselfudaemonic((u./opt/alt/python33/lib64/python3.3/threading.pyu	setDaemonSsuThread.setDaemoncCs|jS(N(uname(uself((u./opt/alt/python33/lib64/python3.3/threading.pyugetNameVsuThread.getNamecCs
||_dS(N(uname(uselfuname((u./opt/alt/python33/lib64/python3.3/threading.pyusetNameYsuThread.setNameNF( u__name__u
__module__u__qualname__u__doc__uFalseu_Thread__initializedu_sysuexc_infou_Thread__exc_infouNoneu__init__u_reset_internal_locksu__repr__ustarturunu
_bootstrapu
_set_identu_bootstrap_inneru_stopu_deleteujoinupropertyunameusetteruidentuis_aliveuisAliveudaemonuisDaemonu	setDaemonugetNameusetName(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuThread�s4	+
A#.cBsD|EeZdZdZdddd�Zdd�Zdd�ZdS(	uTimeru�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

    cCsetj|�||_||_|dk	r1|ng|_|dk	rL|ni|_t�|_dS(N(	uThreadu__init__uintervalufunctionuNoneuargsukwargsuEventufinished(uselfuintervalufunctionuargsukwargs((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__gs
		uTimer.__init__cCs|jj�dS(u)Stop the timer if it hasn't finished yet.N(ufinisheduset(uself((u./opt/alt/python33/lib64/python3.3/threading.pyucancelosuTimer.cancelcCsL|jj|j�|jj�s;|j|j|j�n|jj�dS(N(ufinisheduwaituintervaluis_setufunctionuargsukwargsuset(uself((u./opt/alt/python33/lib64/python3.3/threading.pyurunssu	Timer.runN(u__name__u
__module__u__qualname__u__doc__uNoneu__init__ucancelurun(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyuTimer^scBs,|EeZdZdd�Zdd�ZdS(u_MainThreadc
CsNtj|dddd�|jj�|j�t�|t|j<WdQXdS(Nunameu
MainThreadudaemonF(	uThreadu__init__uFalseu_startedusetu
_set_identu_active_limbo_locku_activeu_ident(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__~s


u_MainThread.__init__cCsA|j�t�}x|r2|j�t�}qW|j�dS(N(u_stopu_pickSomeNonDaemonThreadujoinu_delete(uselfut((u./opt/alt/python33/lib64/python3.3/threading.pyu	_exitfunc�s
		

u_MainThread._exitfuncN(u__name__u
__module__u__qualname__u__init__u	_exitfunc(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyu_MainThread|su_MainThreadcCs2x+t�D] }|jr
|j�r
|Sq
WdS(N(u	enumerateudaemonuis_aliveuNone(ut((u./opt/alt/python33/lib64/python3.3/threading.pyu_pickSomeNonDaemonThread�su_pickSomeNonDaemonThreadcBs;|EeZdZdd�Zdd�Zddd�ZdS(u_DummyThreadc
CsZtj|dtd�dd�|`|jj�|j�t�|t	|j
<WdQXdS(NunameuDummy-%dudaemonT(uThreadu__init__u_newnameuTrueu_blocku_startedusetu
_set_identu_active_limbo_locku_activeu_ident(uself((u./opt/alt/python33/lib64/python3.3/threading.pyu__init__�s

u_DummyThread.__init__cCsdS(N((uself((u./opt/alt/python33/lib64/python3.3/threading.pyu_stop�su_DummyThread._stopcCsdstd��dS(Nucannot join a dummy threadF(uFalseuAssertionError(uselfutimeout((u./opt/alt/python33/lib64/python3.3/threading.pyujoin�su_DummyThread.joinN(u__name__u
__module__u__qualname__u__init__u_stopuNoneujoin(u
__locals__((u./opt/alt/python33/lib64/python3.3/threading.pyu_DummyThread�s
u_DummyThreadcCs/ytt�SWntk
r*t�SYnXdS(u�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(u_activeu	get_identuKeyErroru_DummyThread(((u./opt/alt/python33/lib64/python3.3/threading.pyucurrent_thread�s
c
Cs%t�tt�tt�SWdQXdS(u�Return the number of Thread objects currently alive.

    The returned count is equal to the length of the list returned by
    enumerate().

    N(u_active_limbo_lockulenu_activeu_limbo(((u./opt/alt/python33/lib64/python3.3/threading.pyuactive_count�scCs ttj��ttj��S(N(ulistu_activeuvaluesu_limbo(((u./opt/alt/python33/lib64/python3.3/threading.pyu
_enumerate�su
_enumeratec
Cs1t�%ttj��ttj��SWdQXdS(u�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(u_active_limbo_lockulistu_activeuvaluesu_limbo(((u./opt/alt/python33/lib64/python3.3/threading.pyu	enumerate�s(u
stack_size(u_local(ulocalcCs�t�ai}t�}t��xPt�D]E}|j�||krdt�}||_|||<q)|j�q)Wtj	�t
j	�t
j|�tt
�dks�t
�WdQXdS(Ni(u_allocate_locku_active_limbo_lockucurrent_threadu
_enumerateu_reset_internal_locksu	get_identu_identu_stopu_limbouclearu_activeuupdateulenuAssertionError(u
new_activeucurrentuthreaduident((u./opt/alt/python33/lib64/python3.3/threading.pyu_after_fork�s		
		



u_after_fork(Bu__doc__usysu_sysu_threadutimeusleepu_sleepu	monotonicu_timeuImportErroru	tracebacku
format_excu_format_excu_weakrefsetuWeakSetu__all__ustart_new_threadu_start_new_threadu
allocate_locku_allocate_locku	get_identuerroruThreadErroruRLocku_CRLockuAttributeErroruNoneuTIMEOUT_MAXu
_profile_hooku_trace_hooku
setprofileusettraceuLocku_RLocku_PyRLocku	Conditionu	SemaphoreuBoundedSemaphoreuEventuBarrieruRuntimeErroruBrokenBarrierErroru_counteru_newnameu_active_limbo_locku_activeu_limbou	_danglinguThreaduTimeru_MainThreadu_pickSomeNonDaemonThreadu_DummyThreaducurrent_threadu
currentThreaduactive_countuactiveCountu
_enumerateu	enumerateu
stack_sizeu	_exitfuncu	_shutdownu_localulocalu_threading_localu_after_fork(((u./opt/alt/python33/lib64/python3.3/threading.pyu<module>sz
				

	

k�P&X�		�|