;
Êâ"Ic               @   s¨  d  Z  d d l Z d d l Z d d l m Z m Z d d l m	 Z
 d d l m Z d d d d	 d
 d d d d d d d d d d g Z e j Z e j Z e j Z e j Z [ e Z Gd „  d e ƒ Z e a e a d „  Z d „  Z e Z d „  Z  Gd „  d e ƒ Z! d „  Z" Gd „  d e ƒ Z# d „  Z$ Gd  „  d! e ƒ Z% d" „  Z& Gd# „  d$ e% ƒ Z' d% „  Z( Gd& „  d' e ƒ Z) d a* d( d) „ Z+ e ƒ  a, i  Z- i  Z. Gd* „  d e ƒ Z/ d+ „  Z0 Gd, „  d- e/ ƒ Z1 Gd. „  d/ e/ ƒ Z2 d0 „  Z3 Gd1 „  d2 e/ ƒ Z4 d3 „  Z5 e5 Z6 d4 „  Z7 e7 Z8 d5 „  Z9 d d6 l m: Z: e2 ƒ  j; Z< y d d7 l m= Z> Wn$ e? k
 o d d8 l@ m> Z> Yn Xd9 „  ZA d: „  ZB eC d; k o eB ƒ  n d S(<   u;   Thread module emulating a subset of Java's threading model.i    N(   u   timeu   sleep(   u
   format_exc(   u   dequeu   active_countu	   Conditionu   current_threadu	   enumerateu   Eventu   Locku   RLocku	   Semaphoreu   BoundedSemaphoreu   Threadu   Timeru
   setprofileu   settraceu   localu
   stack_sizec             B   s#   |  Ee  Z d d  „ Z d „  Z d S(   c             C   s$   | d  k o
 t } n | |  _ d  S(   N(   u   Noneu   _VERBOSEu   _verbose(   u   selfu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__-   s    
c             G   sB   |  j  o4 | | } d t ƒ  j | f } t j j | ƒ n d  S(   Nu   %s: %s
(   u   _verboseu   current_threadu   nameu   _sysu   stderru   write(   u   selfu   formatu   args(    (    u&   /mit/python/lib/python3.0/threading.pyu   _note2   s
    

N(   u   __name__u
   __module__u   Noneu   __init__u   _note(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _Verbose+   s   
u   _Verbosec             C   s
   |  a  d  S(   N(   u   _profile_hook(   u   func(    (    u&   /mit/python/lib/python3.0/threading.pyu
   setprofileF   s    c             C   s
   |  a  d  S(   N(   u   _trace_hook(   u   func(    (    u&   /mit/python/lib/python3.0/threading.pyu   settraceJ   s    c              O   s   t  |  | Ž  S(   N(   u   _RLock(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu   RLockR   s    c             B   sb   |  Ee  Z d	 d  „ Z d „  Z d d „ Z e Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d	 S(
   c             C   s2   t  j |  | ƒ t ƒ  |  _ d  |  _ d |  _ d  S(   Ni    (   u   _Verboseu   __init__u   _allocate_locku   _blocku   Noneu   _owneru   _count(   u   selfu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__W   s    	c             C   s-   |  j  } d |  j j | o | j |  j f S(   Nu   <%s(%s, %d)>(   u   _owneru	   __class__u   __name__u   nameu   _count(   u   selfu   owner(    (    u&   /mit/python/lib/python3.0/threading.pyu   __repr__]   s
    		i   c             C   sš   t  ƒ  } |  j | k o( |  j d |  _ |  j d |  | ƒ d S|  j j | ƒ } | o) | |  _ d |  _ |  j d |  | ƒ n |  j d |  | ƒ | S(   Ni   u!   %s.acquire(%s): recursive successu   %s.acquire(%s): initial successu   %s.acquire(%s): failure(   u   current_threadu   _owneru   _countu   _noteu   _blocku   acquire(   u   selfu   blockingu   meu   rc(    (    u&   /mit/python/lib/python3.0/threading.pyu   acquired   s    			c             C   s|   |  j  t ƒ  k	 o t d ƒ ‚ n |  j d |  _ } | p* d  |  _  |  j j ƒ  |  j d |  ƒ n |  j d |  ƒ d  S(   Nu   cannot release un-aquired locki   u   %s.release(): final releaseu   %s.release(): non-final release(   u   _owneru   current_threadu   RuntimeErroru   _countu   Noneu   _blocku   releaseu   _note(   u   selfu   count(    (    u&   /mit/python/lib/python3.0/threading.pyu   releasex   s    	c             C   s   |  j  ƒ  d  S(   N(   u   release(   u   selfu   tu   vu   tb(    (    u&   /mit/python/lib/python3.0/threading.pyu   __exit__…   s    c             C   s3   |  j  j ƒ  | \ |  _ |  _ |  j d |  ƒ d  S(   Nu   %s._acquire_restore()(   u   _blocku   acquireu   _countu   _owneru   _note(   u   selfu   state(    (    u&   /mit/python/lib/python3.0/threading.pyu   _acquire_restoreŠ   s    c             C   sK   |  j  d |  ƒ |  j } d |  _ |  j } d  |  _ |  j j ƒ  | | f S(   Nu   %s._release_save()i    (   u   _noteu   _countu   _owneru   Noneu   _blocku   release(   u   selfu   countu   owner(    (    u&   /mit/python/lib/python3.0/threading.pyu   _release_save   s    				c             C   s   |  j  t ƒ  k S(   N(   u   _owneru   current_thread(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu	   _is_ownedš   s    N(   u   __name__u
   __module__u   Noneu   __init__u   __repr__u   acquireu	   __enter__u   releaseu   __exit__u   _acquire_restoreu   _release_saveu	   _is_owned(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _RLockU   s   
					
u   _RLockc              O   s   t  |  | Ž  S(   N(   u
   _Condition(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu	   Conditionž   s    c             B   sz   |  Ee  Z d d d  „ Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 d d „ Z
 d d	 „ Z d
 „  Z e Z d S(   c             C   sÍ   t  j |  | ƒ | d  k o t ƒ  } n | |  _ | j |  _ | j |  _ y | j |  _ Wn t k
 o Yn Xy | j	 |  _	 Wn t k
 o Yn Xy | j
 |  _
 Wn t k
 o Yn Xg  |  _ d  S(   N(   u   _Verboseu   __init__u   Noneu   RLocku   _locku   acquireu   releaseu   _release_saveu   AttributeErroru   _acquire_restoreu	   _is_ownedu   _waiters(   u   selfu   locku   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__£   s&    	c             C   s   |  j  j ƒ  S(   N(   u   _locku	   __enter__(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu	   __enter__¼   s    c             G   s   |  j  j | Œ  S(   N(   u   _locku   __exit__(   u   selfu   args(    (    u&   /mit/python/lib/python3.0/threading.pyu   __exit__¿   s    c             C   s   d |  j  t |  j ƒ f S(   Nu   <Condition(%s, %d)>(   u   _locku   lenu   _waiters(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   __repr__Â   s    c             C   s   |  j  j ƒ  d  S(   N(   u   _locku   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   _release_saveÅ   s    c             C   s   |  j  j ƒ  d  S(   N(   u   _locku   acquire(   u   selfu   x(    (    u&   /mit/python/lib/python3.0/threading.pyu   _acquire_restoreÈ   s    c             C   s-   |  j  j d ƒ o |  j  j ƒ  d Sd Sd  S(   Ni    FT(   u   _locku   acquireu   releaseu   Falseu   True(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu	   _is_ownedË   s    c             C   s_  |  j  ƒ  p t d ƒ ‚ n t ƒ  } | j ƒ  |  j j | ƒ |  j ƒ  } zþ | d  k o | j ƒ  |  j d |  ƒ nÐ t	 ƒ  | } d } x] | j d ƒ } | o Pn | t	 ƒ  } | d k o Pn t
 | d | d ƒ } t | ƒ q | pB |  j d |  | ƒ y |  j j | ƒ WqIt k
 o YqIXn |  j d |  | ƒ Wd  |  j | ƒ Xd  S(	   Nu   cannot wait on un-aquired locku   %s.wait(): got itgü©ñÒMb@?i    i   gš™™™™™©?u   %s.wait(%s): timed outu   %s.wait(%s): got it(   u	   _is_ownedu   RuntimeErroru   _allocate_locku   acquireu   _waitersu   appendu   _release_saveu   Noneu   _noteu   _timeu   minu   _sleepu   removeu
   ValueErroru   _acquire_restore(   u   selfu   timeoutu   waiteru   saved_stateu   endtimeu   delayu   gotitu	   remaining(    (    u&   /mit/python/lib/python3.0/threading.pyu   waitÔ   s:    	


i   c          	   C   sÃ   |  j  ƒ  p t d ƒ ‚ n |  j } | d  | … } | p |  j d |  ƒ d  S|  j d |  | | d k o d p d ƒ x@ | D]8 } | j ƒ  y | j | ƒ Wqƒ t k
 o Yqƒ Xqƒ Wd  S(   Nu    cannot notify on un-aquired locku   %s.notify(): no waitersu"   %s.notify(): notifying %d waiter%si   u   su    (   u	   _is_ownedu   RuntimeErroru   _waitersu   _noteu   releaseu   removeu
   ValueError(   u   selfu   nu   _Condition__waitersu   waitersu   waiter(    (    u&   /mit/python/lib/python3.0/threading.pyu   notifyþ   s     	 
c             C   s   |  j  t |  j ƒ ƒ d  S(   N(   u   notifyu   lenu   _waiters(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu
   notify_all  s    N(   u   __name__u
   __module__u   Noneu   __init__u	   __enter__u   __exit__u   __repr__u   _release_saveu   _acquire_restoreu	   _is_ownedu   waitu   notifyu
   notify_allu	   notifyAll(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu
   _Condition¡   s   
							*	u
   _Conditionc              O   s   t  |  | Ž  S(   N(   u
   _Semaphore(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu	   Semaphore  s    c             B   sA   |  Ee  Z d  d d „ Z d  d „ Z e Z d „  Z d „  Z d S(   i   c             C   sL   | d k  o t  d ƒ ‚ n t j |  | ƒ t t ƒ  ƒ |  _ | |  _ d  S(   Ni    u$   semaphore initial value must be >= 0(   u
   ValueErroru   _Verboseu   __init__u	   Conditionu   Locku   _condu   _value(   u   selfu   valueu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__  s
    c             C   sš   d } |  j j ƒ  xs |  j d k o6 | p Pn |  j d |  | |  j ƒ |  j j ƒ  q W|  j d |  _ |  j d |  |  j ƒ d } |  j j ƒ  | S(   Ni    u)   %s.acquire(%s): blocked waiting, value=%si   u   %s.acquire: success, value=%sFT(   u   Falseu   _condu   acquireu   _valueu   _noteu   waitu   Trueu   release(   u   selfu   blockingu   rc(    (    u&   /mit/python/lib/python3.0/threading.pyu   acquire$  s     		c             C   sQ   |  j  j ƒ  |  j d |  _ |  j d |  |  j ƒ |  j  j ƒ  |  j  j ƒ  d  S(   Ni   u   %s.release: success, value=%s(   u   _condu   acquireu   _valueu   _noteu   notifyu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   release9  s    	c             C   s   |  j  ƒ  d  S(   N(   u   release(   u   selfu   tu   vu   tb(    (    u&   /mit/python/lib/python3.0/threading.pyu   __exit__B  s    N(   u   __name__u
   __module__u   Noneu   __init__u   acquireu	   __enter__u   releaseu   __exit__(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu
   _Semaphore  s
   
		u
   _Semaphorec              O   s   t  |  | Ž  S(   N(   u   _BoundedSemaphore(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu   BoundedSemaphoreF  s    c             B   s,   |  Ee  Z d  Z d d d „ Z d „  Z d S(   u6   Semaphore that checks that # releases is <= # acquiresi   c             C   s    t  j |  | | ƒ | |  _ d  S(   N(   u
   _Semaphoreu   __init__u   _initial_value(   u   selfu   valueu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__K  s    c             C   s0   |  j  |  j k o t d ƒ ‚ n t j |  ƒ S(   Nu!   Semaphore released too many times(   u   _valueu   _initial_valueu
   ValueErroru
   _Semaphoreu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   releaseO  s    N(   u   __name__u
   __module__u   __doc__u   Noneu   __init__u   release(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _BoundedSemaphoreI  s   
u   _BoundedSemaphorec              O   s   t  |  | Ž  S(   N(   u   _Event(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu   EventU  s    c             B   sG   |  Ee  Z d d  „ Z d „  Z e Z d „  Z d „  Z d d „ Z d S(   c             C   s/   t  j |  | ƒ t t ƒ  ƒ |  _ d |  _ d  S(   NF(   u   _Verboseu   __init__u	   Conditionu   Locku   _condu   Falseu   _flag(   u   selfu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__\  s    c             C   s   |  j  S(   N(   u   _flag(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   is_seta  s    c             C   s<   |  j  j ƒ  z d |  _ |  j  j ƒ  Wd  |  j  j ƒ  Xd  S(   NT(   u   _condu   acquireu   Trueu   _flagu
   notify_allu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   setf  s
    	c             C   s/   |  j  j ƒ  z d |  _ Wd  |  j  j ƒ  Xd  S(   NF(   u   _condu   acquireu   Falseu   _flagu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   clearn  s    c             C   sD   |  j  j ƒ  z" |  j p |  j  j | ƒ n Wd  |  j  j ƒ  Xd  S(   N(   u   _condu   acquireu   _flagu   waitu   release(   u   selfu   timeout(    (    u&   /mit/python/lib/python3.0/threading.pyu   waitu  s
    
N(	   u   __name__u
   __module__u   Noneu   __init__u   is_setu   isSetu   setu   clearu   wait(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _EventX  s   
			u   _Eventu	   Thread-%dc             C   s   t  d a  |  t  S(   Ni   (   u   _counter(   u   template(    (    u&   /mit/python/lib/python3.0/threading.pyu   _newname  s    
c             B   s  |  Ee  Z d Z e j Z d d d d d d d  „ Z d „  Z	 d „  Z
 d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z d d	 „ Z e d
 „  ƒ Z e j d „  ƒ Z e d „  ƒ Z d „  Z e Z e d „  ƒ Z e j d „  ƒ Z d „  Z d „  Z d „  Z d „  Z d S(   c             C   sÍ   | d  k p t d ƒ ‚ t j |  | ƒ | d  k o
 i  } n | |  _ t | p t ƒ  ƒ |  _ | |  _ | |  _	 |  j
 ƒ  |  _ d  |  _ t ƒ  |  _ d |  _ t t ƒ  ƒ |  _ d |  _ t j |  _ d  S(   Nu#   group argument must be None for nowFT(   u   Noneu   AssertionErroru   _Verboseu   __init__u   _targetu   stru   _newnameu   _nameu   _argsu   _kwargsu   _set_daemonu	   _daemonicu   _identu   Eventu   _startedu   Falseu   _stoppedu	   Conditionu   Locku   _blocku   Trueu   _initializedu   _sysu   stderru   _stderr(   u   selfu   groupu   targetu   nameu   argsu   kwargsu   verbose(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__˜  s    
						c             C   s
   t  ƒ  j S(   N(   u   current_threadu   daemon(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   _set_daemon¬  s    c             C   s¢   |  j  p t d ƒ ‚ d } |  j j ƒ  o
 d } n |  j o
 d } n |  j o | d 7} n |  j d  k	 o | d |  j 7} n d |  j j	 |  j
 | f S(   Nu    Thread.__init__() was not calledu   initialu   startedu   stoppedu    daemonu    %su   <%s(%s, %s)>(   u   _initializedu   AssertionErroru   _startedu   is_setu   _stoppedu	   _daemonicu   _identu   Noneu	   __class__u   __name__u   _name(   u   selfu   status(    (    u&   /mit/python/lib/python3.0/threading.pyu   __repr__°  s    



c             C   s‰   |  j  p t d ƒ ‚ n |  j j ƒ  o t d ƒ ‚ n |  j d |  ƒ t j ƒ  |  t |  <t j ƒ  t	 |  j
 d ƒ |  j j ƒ  d  S(   Nu   thread.__init__() not calledu   thread already startedu   %s.start(): starting thread(    (   u   _initializedu   RuntimeErroru   _startedu   is_setu   _noteu   _active_limbo_locku   acquireu   _limbou   releaseu   _start_new_threadu
   _bootstrapu   wait(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   start½  s    



c          	   C   sB   z( |  j  o |  j  |  j |  j Ž  n Wd  |  `  |  ` |  ` Xd  S(   N(   u   _targetu   _argsu   _kwargs(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   runË  s    
c             C   s<   y |  j  ƒ  Wn' |  j o t d  k o d  S‚  Yn Xd  S(   N(   u   _bootstrap_inneru	   _daemonicu   _sysu   None(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu
   _bootstrapÔ  s    c          $   C   s@  zõt  ƒ  |  _ |  j j ƒ  t j ƒ  |  t |  j <t |  =t j ƒ  |  j	 d |  ƒ t
 o! |  j	 d |  ƒ t j t
 ƒ n t o! |  j	 d |  ƒ t j t ƒ n zLy |  j ƒ  Wn't k
 o |  j	 d |  ƒ Yn|  j	 d |  ƒ t o$ t j j d |  j t ƒ  f ƒ nÂ |  j ƒ  \ } } } zŸ t d |  j d d	 |  j ƒt d
 d	 |  j ƒxJ | oB t d | j j j | j | j j j f d	 |  j ƒ| j } qeWt d | | f d	 |  j ƒWd  ~ ~ ~ XYn X|  j	 d |  ƒ Wd  XWd  t j } j ƒ  z' |  j  ƒ  y t t  ƒ  =Wn Yn XWd  | ~ QXXd  S(   Nu   %s._bootstrap(): thread startedu'   %s._bootstrap(): registering trace hooku)   %s._bootstrap(): registering profile hooku"   %s._bootstrap(): raised SystemExitu$   %s._bootstrap(): unhandled exceptionu   Exception in thread %s:
%s
u   Exception in thread u2    (most likely raised during interpreter shutdown):u   fileu"   Traceback (most recent call last):u     File "%s", line %s, in %su   %s: %su   %s._bootstrap(): normal return(!   u
   _get_identu   _identu   _startedu   setu   _active_limbo_locku   acquireu   _activeu   _limbou   releaseu   _noteu   _trace_hooku   _sysu   settraceu   _profile_hooku
   setprofileu   runu
   SystemExitu   stderru   writeu   nameu   _format_excu	   _exc_infou   printu   _stderru   tb_frameu   f_codeu   co_filenameu	   tb_linenou   co_nameu   tb_nextu   __exit__u	   __enter__u   _stop(   u   selfu   exc_typeu	   exc_valueu   exc_tbu   _[1](    (    u&   /mit/python/lib/python3.0/threading.pyu   _bootstrap_innerè  sb    

 
 !
c             C   s4   |  j  j ƒ  d |  _ |  j  j ƒ  |  j  j ƒ  d  S(   NT(   u   _blocku   acquireu   Trueu   _stoppedu
   notify_allu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   _stop4  s    	c             C   s`   y. t  j } j ƒ  z t t ƒ  =Wd | ~ QXWn+ t k
 o d t j k o ‚  n Yn Xd S(   uA   Remove current thread from the dict of currently running threads.Nu   dummy_threading(   u   _active_limbo_locku   __exit__u	   __enter__u   _activeu
   _get_identu   KeyErroru   _sysu   modules(   u   selfu   _[1](    (    u&   /mit/python/lib/python3.0/threading.pyu   _delete:  s    c          	   C   sL  |  j  p t d ƒ ‚ n |  j j ƒ  p t d ƒ ‚ n |  t ƒ  k o t d ƒ ‚ n |  j p |  j d |  ƒ n |  j j ƒ  z² | d  k o3 x |  j p |  j j
 ƒ  q˜ W|  j d |  ƒ no t ƒ  | } x^ |  j pC | t ƒ  } | d k o |  j d |  ƒ Pn |  j j
 | ƒ qØ W|  j d |  ƒ Wd  |  j j ƒ  Xd  S(   Nu   Thread.__init__() not calledu'   cannot join thread before it is startedu   cannot join current threadu%   %s.join(): waiting until thread stopsu   %s.join(): thread stoppedi    u   %s.join(): timed out(   u   _initializedu   RuntimeErroru   _startedu   is_setu   current_threadu   _stoppedu   _noteu   _blocku   acquireu   Noneu   waitu   _timeu   release(   u   selfu   timeoutu   deadlineu   delay(    (    u&   /mit/python/lib/python3.0/threading.pyu   join]  s2    

 
 
c             C   s   |  j  p t d ƒ ‚ |  j S(   Nu   Thread.__init__() not called(   u   _initializedu   AssertionErroru   _name(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   name  s    c             C   s*   |  j  p t d ƒ ‚ t | ƒ |  _ d  S(   Nu   Thread.__init__() not called(   u   _initializedu   AssertionErroru   stru   _name(   u   selfu   name(    (    u&   /mit/python/lib/python3.0/threading.pyu   name„  s    c             C   s   |  j  p t d ƒ ‚ |  j S(   Nu   Thread.__init__() not called(   u   _initializedu   AssertionErroru   _ident(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   ident‰  s    c             C   s/   |  j  p t d ƒ ‚ |  j j ƒ  o |  j S(   Nu   Thread.__init__() not called(   u   _initializedu   AssertionErroru   _startedu   is_setu   _stopped(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   is_aliveŽ  s    c             C   s   |  j  p t d ƒ ‚ |  j S(   Nu   Thread.__init__() not called(   u   _initializedu   AssertionErroru	   _daemonic(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   daemon”  s    c             C   sG   |  j  p t d ƒ ‚ n |  j j ƒ  o t d ƒ ‚ n | |  _ d  S(   Nu   Thread.__init__() not calledu)   cannot set daemon status of active thread(   u   _initializedu   RuntimeErroru   _startedu   is_setu	   _daemonic(   u   selfu   daemonic(    (    u&   /mit/python/lib/python3.0/threading.pyu   daemon™  s
    
c             C   s   |  j  S(   N(   u   daemon(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   isDaemon¡  s    c             C   s   | |  _  d  S(   N(   u   daemon(   u   selfu   daemonic(    (    u&   /mit/python/lib/python3.0/threading.pyu	   setDaemon¤  s    c             C   s   |  j  S(   N(   u   name(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   getName§  s    c             C   s   | |  _  d  S(   N(   u   name(   u   selfu   name(    (    u&   /mit/python/lib/python3.0/threading.pyu   setNameª  s    NF(    (   u   __name__u
   __module__u   Falseu   _Thread__initializedu   _sysu   exc_infou   _Thread__exc_infou   Noneu   __init__u   _set_daemonu   __repr__u   startu   runu
   _bootstrapu   _bootstrap_inneru   _stopu   _deleteu   joinu   propertyu   nameu   setteru   identu   is_aliveu   isAliveu   daemonu   isDaemonu	   setDaemonu   getNameu   setName(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   ThreadŒ  s0   
									L		#"				c              O   s   t  |  | Ž  S(   N(   u   _Timer(   u   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu   Timer¯  s    c             B   s5   |  Ee  Z d  Z g  i  d „ Z d „  Z d „  Z d S(   u²   Call a function after a specified number of seconds:

    t = Timer(30.0, f, args=[], kwargs={})
    t.start()
    t.cancel() # stop the timer's action if it's still waiting
    c             C   sA   t  j |  ƒ | |  _ | |  _ | |  _ | |  _ t ƒ  |  _ d  S(   N(   u   Threadu   __init__u   intervalu   functionu   argsu   kwargsu   Eventu   finished(   u   selfu   intervalu   functionu   argsu   kwargs(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__º  s    				c             C   s   |  j  j ƒ  d S(   u(   Stop the timer if it hasn't finished yetN(   u   finishedu   set(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   cancelÂ  s    c             C   sN   |  j  j |  j ƒ |  j  j ƒ  p |  j |  j |  j Ž  n |  j  j ƒ  d  S(   N(   u   finishedu   waitu   intervalu   is_setu   functionu   argsu   kwargsu   set(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   runÆ  s    N(   u   __name__u
   __module__u   __doc__u   __init__u   cancelu   run(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _Timer²  s   
	u   _Timerc             B   s)   |  Ee  Z d  „  Z d „  Z d „  Z d S(   c             C   sE   t  j |  d d ƒ|  j j ƒ  t j ƒ  |  t t ƒ  <t j ƒ  d  S(   Nu   nameu
   MainThread(	   u   Threadu   __init__u   _startedu   setu   _active_limbo_locku   acquireu   _activeu
   _get_identu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__Ñ  s
    
c             C   s   d S(   NF(   u   False(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   _set_daemonØ  s    c             C   sn   |  j  ƒ  t ƒ  } | o |  j d |  ƒ n x | o | j ƒ  t ƒ  } q1 W|  j d |  ƒ |  j ƒ  d  S(   Nu   %s: waiting for other threadsu   %s: exiting(   u   _stopu   _pickSomeNonDaemonThreadu   _noteu   joinu   _delete(   u   selfu   t(    (    u&   /mit/python/lib/python3.0/threading.pyu	   _exitfuncÛ  s    
	 
N(   u   __name__u
   __module__u   __init__u   _set_daemonu	   _exitfunc(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _MainThreadÏ  s   
		u   _MainThreadc              C   s5   x. t  ƒ  D]# }  |  j o |  j ƒ  o |  Sq
 Wd  S(   N(   u	   enumerateu   daemonu   is_aliveu   None(   u   t(    (    u&   /mit/python/lib/python3.0/threading.pyu   _pickSomeNonDaemonThreadè  s
    
 	c             B   s,   |  Ee  Z d  „  Z d „  Z d d „ Z d S(   c             C   sQ   t  j |  d t d ƒ ƒ|  ` |  j j ƒ  t j ƒ  |  t t	 ƒ  <t j
 ƒ  d  S(   Nu   nameu   Dummy-%d(   u   Threadu   __init__u   _newnameu   _blocku   _startedu   setu   _active_limbo_locku   acquireu   _activeu
   _get_identu   release(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__ù  s    
c             C   s   d S(   NT(   u   True(   u   self(    (    u&   /mit/python/lib/python3.0/threading.pyu   _set_daemon  s    c             C   s   d p t d ƒ ‚ d  S(   Nu   cannot join a dummy threadF(   u   Falseu   AssertionError(   u   selfu   timeout(    (    u&   /mit/python/lib/python3.0/threading.pyu   join
  s    N(   u   __name__u
   __module__u   __init__u   _set_daemonu   Noneu   join(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   _DummyThread÷  s   
		u   _DummyThreadc               C   s1   y t  t ƒ  SWn t k
 o t ƒ  SYn Xd  S(   N(   u   _activeu
   _get_identu   KeyErroru   _DummyThread(    (    (    u&   /mit/python/lib/python3.0/threading.pyu   current_thread  s    c              C   s.   t  j ƒ  t t ƒ t t ƒ }  t  j ƒ  |  S(   N(   u   _active_limbo_locku   acquireu   lenu   _activeu   _limbou   release(   u   count(    (    u&   /mit/python/lib/python3.0/threading.pyu   active_count  s    

c              C   s:   t  j ƒ  t t j ƒ  ƒ t t j ƒ  ƒ }  t  j ƒ  |  S(   N(   u   _active_limbo_locku   acquireu   listu   _activeu   valuesu   _limbou   release(   u   active(    (    u&   /mit/python/lib/python3.0/threading.pyu	   enumerate!  s    
"
(   u
   stack_size(   u   _local(   u   localc           
   C   sÄ   t  ƒ  a i  }  t ƒ  } t j } j ƒ  zŒ xJ t j ƒ  D]< } | | k o  t ƒ  } | | _ | |  | <q9 d | _
 q9 Wt j ƒ  t j ƒ  t j |  ƒ t t ƒ d k p t ‚ Wd  | ~ QXd  S(   Ni   T(   u   _allocate_locku   _active_limbo_locku   current_threadu   __exit__u	   __enter__u   _activeu   valuesu
   _get_identu   _identu   Trueu   _stoppedu   _limbou   clearu   updateu   lenu   AssertionError(   u
   new_activeu   currentu   _[1]u   threadu   ident(    (    u&   /mit/python/lib/python3.0/threading.pyu   _after_fork8  s    		 		

c              C   s  Gd „  d t  ƒ }  Gd „  d t ƒ } Gd „  d t ƒ } d } d } d	 } |  | ƒ } g  } xA t | ƒ D]3 } | | | ƒ }	 d
 | d |	 _ | j |	 ƒ qj W| | | | ƒ }
 x" | D] }	 |	 j ƒ  t d ƒ q» W|
 j ƒ  x | D] }	 |	 j ƒ  qê W|
 j ƒ  d  S(   Nc             B   s)   |  Ee  Z d  „  Z d „  Z d „  Z d S(   c             S   sV   t  j |  ƒ t ƒ  |  _ t |  j ƒ |  _ t |  j ƒ |  _ | |  _ t ƒ  |  _	 d  S(   N(
   u   _Verboseu   __init__u   RLocku   monu	   Conditionu   rcu   wcu   limitu   dequeu   queue(   u   selfu   limit(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__`  s    	c             S   s•   |  j  j ƒ  x; t |  j ƒ |  j k o! |  j d | ƒ |  j j ƒ  q W|  j j | ƒ |  j d | t |  j ƒ ƒ |  j	 j
 ƒ  |  j  j ƒ  d  S(   Nu   put(%s): queue fullu    put(%s): appended, length now %d(   u   monu   acquireu   lenu   queueu   limitu   _noteu   wcu   waitu   appendu   rcu   notifyu   release(   u   selfu   item(    (    u&   /mit/python/lib/python3.0/threading.pyu   puth  s     	c             S   s‚   |  j  j ƒ  x) |  j p |  j d ƒ |  j j ƒ  q W|  j j ƒ  } |  j d | t |  j ƒ ƒ |  j j	 ƒ  |  j  j
 ƒ  | S(   Nu   get(): queue emptyu   get(): got %s, %d left(   u   monu   acquireu   queueu   _noteu   rcu   waitu   popleftu   lenu   wcu   notifyu   release(   u   selfu   item(    (    u&   /mit/python/lib/python3.0/threading.pyu   gets  s     
N(   u   __name__u
   __module__u   __init__u   putu   get(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   BoundedQueue^  s   
		u   BoundedQueuec             B   s    |  Ee  Z d  „  Z d „  Z d S(   c             S   s)   t  j |  d d ƒ| |  _ | |  _ d  S(   Nu   nameu   Producer(   u   Threadu   __init__u   queueu   quota(   u   selfu   queueu   quota(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__€  s    	c             S   sj   d d l  m  } d } xM | |  j k  o< | d } |  j j d |  j | f ƒ t | ƒ  d ƒ q Wd  S(   Ni    (   u   randomi   u   %s.%dgñhãˆµøä>(   u   randomu   quotau   queueu   putu   nameu   _sleep(   u   selfu   randomu   counter(    (    u&   /mit/python/lib/python3.0/threading.pyu   run…  s     
N(   u   __name__u
   __module__u   __init__u   run(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   ProducerThread~  s   
	u   ProducerThreadc             B   s    |  Ee  Z d  „  Z d „  Z d S(   c             S   s)   t  j |  d d ƒ| |  _ | |  _ d  S(   Nu   nameu   Consumer(   u   Threadu   __init__u   queueu   count(   u   selfu   queueu   count(    (    u&   /mit/python/lib/python3.0/threading.pyu   __init__  s    	c             S   sE   x> |  j  d k o- |  j j ƒ  } t | ƒ |  j  d |  _  q Wd  S(   Ni    i   (   u   countu   queueu   getu   print(   u   selfu   item(    (    u&   /mit/python/lib/python3.0/threading.pyu   run•  s
     
N(   u   __name__u
   __module__u   __init__u   run(   u
   __locals__(    (    u&   /mit/python/lib/python3.0/threading.pyu   ConsumerThreadŽ  s   
	u   ConsumerThreadi   i   i   u   Producer-%di   gíµ ÷Æ°>(   u   _Verboseu   Threadu   rangeu   nameu   appendu   startu   _sleepu   join(   u   BoundedQueueu   ProducerThreadu   ConsumerThreadu   NPu   QLu   NIu   Qu   Pu   iu   tu   C(    (    u&   /mit/python/lib/python3.0/threading.pyu   _test\  s.       

 u   __main__(D   u   __doc__u   sysu   _sysu   _threadu   timeu   _timeu   sleepu   _sleepu	   tracebacku
   format_excu   _format_excu   collectionsu   dequeu   __all__u   start_new_threadu   _start_new_threadu   allocate_locku   _allocate_locku	   get_identu
   _get_identu   erroru   ThreadErroru   Falseu   _VERBOSEu   objectu   _Verboseu   Noneu   _profile_hooku   _trace_hooku
   setprofileu   settraceu   Locku   RLocku   _RLocku	   Conditionu
   _Conditionu	   Semaphoreu
   _Semaphoreu   BoundedSemaphoreu   _BoundedSemaphoreu   Eventu   _Eventu   _counteru   _newnameu   _active_limbo_locku   _activeu   _limbou   Threadu   Timeru   _Timeru   _MainThreadu   _pickSomeNonDaemonThreadu   _DummyThreadu   current_threadu   currentThreadu   active_countu   activeCountu	   enumerateu
   stack_sizeu	   _exitfuncu	   _shutdownu   _localu   localu   ImportErroru   _threading_localu   _after_forku   _testu   __name__(    (    (    u&   /mit/python/lib/python3.0/threading.pyu   <module>   sr   								I	u	-		&	ÿ $						$	R