;ò
òŒü?c           @   s”  d  Z  d k Z y d k Z Wn  e j
 o e i e =‚  n Xd k l Z d k	 l	 Z
 l Z d k l Z d d d d d	 d
 d d d d d d d g Z e i Z e i Z e i Z e i Z [ e Z e o d e f d „  ƒ  YZ n d e f d „  ƒ  YZ e a e a  d „  Z! d „  Z" e Z# d „  Z$ d e f d „  ƒ  YZ% d „  Z& d e f d „  ƒ  YZ' d „  Z( d e f d „  ƒ  YZ) d  „  Z* d! e) f d" „  ƒ  YZ+ d# „  Z, d$ e f d% „  ƒ  YZ- d& a. d' d( „ Z/ e ƒ  Z0 h  Z1 h  Z2 d e f d) „  ƒ  YZ3 d* „  Z4 d+ e3 f d, „  ƒ  YZ5 d- e3 f d. „  ƒ  YZ6 d/ „  Z7 d0 e3 f d1 „  ƒ  YZ8 d2 „  Z9 d3 „  Z: d4 „  Z; e6 ƒ  d5 „  Z< e d6 j o e< ƒ  n d S(7   s;   Thread module emulating a subset of Java's threading model.N(   s   StringIO(   s   times   sleep(   s	   print_excs   activeCounts	   Conditions   currentThreads	   enumerates   Events   Locks   RLocks	   Semaphores   BoundedSemaphores   Threads   Timers
   setprofiles   settraces   _Verbosec           B   s   t  Z e d „ Z d „  Z RS(   Nc         C   s$   | t j o
 t } n | |  _ d  S(   N(   s   verboses   Nones   _VERBOSEs   selfs   _Verbose__verbose(   s   selfs   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__'   s    
c         G   sE   |  i o7 | | } d t ƒ  i ƒ  | f } t i i | ƒ n d  S(   Ns   %s: %s
(	   s   selfs   _Verbose__verboses   formats   argss   currentThreads   getNames   _syss   stderrs   write(   s   selfs   formats   args(    (    s&   /mit/python/lib/python2.3/threading.pys   _note,   s    

(   s   __name__s
   __module__s   Nones   __init__s   _note(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _Verbose%   s   c           B   s   t  Z e d „ Z d „  Z RS(   Nc         C   s   d  S(   N(    (   s   selfs   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__6   s    c         G   s   d  S(   N(    (   s   selfs   args(    (    s&   /mit/python/lib/python2.3/threading.pys   _note8   s    (   s   __name__s
   __module__s   Nones   __init__s   _note(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _Verbose5   s   c         C   s
   |  a d  S(   N(   s   funcs   _profile_hook(   s   func(    (    s&   /mit/python/lib/python2.3/threading.pys
   setprofile@   s     c         C   s
   |  a d  S(   N(   s   funcs   _trace_hook(   s   func(    (    s&   /mit/python/lib/python2.3/threading.pys   settraceD   s     c          O   s   t  |  | Ž  Sd  S(   N(   s   _RLocks   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys   RLockL   s    s   _RLockc           B   sM   t  Z e d „ Z d „  Z d d „ Z d „  Z d „  Z d „  Z d „  Z	 RS(	   Nc         C   s2   t  i |  | ƒ t ƒ  |  _ t |  _ d |  _ d  S(   Ni    (	   s   _Verboses   __init__s   selfs   verboses   _allocate_locks   _RLock__blocks   Nones   _RLock__owners   _RLock__count(   s   selfs   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__Q   s    	c         C   s1   d |  i i |  i o |  i i ƒ  |  i f Sd  S(   Ns   <%s(%s, %d)>(   s   selfs	   __class__s   __name__s   _RLock__owners   getNames   _RLock__count(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   __repr__W   s    i   c         C   sÂ   t  ƒ  } |  i | j o6 |  i d |  _ t o |  i d |  | ƒ n d Sn |  i i	 | ƒ } | o4 | |  _ d |  _ t o |  i d |  | ƒ qº n t o |  i d |  | ƒ n | Sd  S(   Ni   s!   %s.acquire(%s): recursive successs   %s.acquire(%s): initial success   %s.acquire(%s): failure(   s   currentThreads   mes   selfs   _RLock__owners   _RLock__counts	   __debug__s   _notes   blockings   _RLock__blocks   acquires   rc(   s   selfs   blockings   mes   rc(    (    s&   /mit/python/lib/python2.3/threading.pys   acquire]   s    			c         C   s“   t  ƒ  } |  i | j p
 t d ‚ |  i d |  _ } | o5 t |  _ |  i i	 ƒ  t
 o |  i d |  ƒ q n t
 o |  i d |  ƒ n d  S(   Ns   release() of un-acquire()d locki   s   %s.release(): final releases   %s.release(): non-final release(   s   currentThreads   mes   selfs   _RLock__owners   AssertionErrors   _RLock__counts   counts   Nones   _RLock__blocks   releases	   __debug__s   _note(   s   selfs   mes   count(    (    s&   /mit/python/lib/python2.3/threading.pys   releaseo   s    		c         C   sJ   | \ } } |  i i ƒ  | |  _ | |  _ t o |  i d |  ƒ n d  S(   Ns   %s._acquire_restore()(	   s   counts   owners   selfs   _RLock__blocks   acquires   _RLock__counts   _RLock__owners	   __debug__s   _note(   s   selfs   .2s   counts   owner(    (    s&   /mit/python/lib/python2.3/threading.pys   _acquire_restore~   s
   		c         C   sZ   t  o |  i d |  ƒ n |  i } d |  _ |  i } t |  _ |  i i	 ƒ  | | f Sd  S(   Ns   %s._release_save()i    (
   s	   __debug__s   selfs   _notes   _RLock__counts   counts   _RLock__owners   owners   Nones   _RLock__blocks   release(   s   selfs   counts   owner(    (    s&   /mit/python/lib/python2.3/threading.pys   _release_save…   s    				c         C   s   |  i t ƒ  j Sd  S(   N(   s   selfs   _RLock__owners   currentThread(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys	   _is_owned   s    (
   s   __name__s
   __module__s   Nones   __init__s   __repr__s   acquires   releases   _acquire_restores   _release_saves	   _is_owned(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _RLockO   s   				
c          O   s   t  |  | Ž  Sd  S(   N(   s
   _Conditions   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys	   Condition“   s    s
   _Conditionc           B   s\   t  Z e e d „ Z d „  Z d „  Z d „  Z d „  Z e d „ Z d d „ Z	 d	 „  Z
 RS(
   Nc         C   sÊ   t  i |  | ƒ | t j o t ƒ  } n | |  _ | i |  _ | i	 |  _	 y | i
 |  _
 Wn t j
 o n Xy | i |  _ Wn t j
 o n Xy | i |  _ Wn t j
 o n Xg  |  _ d  S(   N(   s   _Verboses   __init__s   selfs   verboses   locks   Nones   RLocks   _Condition__locks   acquires   releases   _release_saves   AttributeErrors   _acquire_restores	   _is_owneds   _Condition__waiters(   s   selfs   locks   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__˜   s&    	c         C   s   d |  i t |  i ƒ f Sd  S(   Ns   <Condition(%s, %d)>(   s   selfs   _Condition__locks   lens   _Condition__waiters(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   __repr__±   s    c         C   s   |  i i ƒ  d  S(   N(   s   selfs   _Condition__locks   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   _release_save´   s    c         C   s   |  i i ƒ  d  S(   N(   s   selfs   _Condition__locks   acquire(   s   selfs   x(    (    s&   /mit/python/lib/python2.3/threading.pys   _acquire_restore·   s    c         C   s0   |  i i d ƒ o |  i i ƒ  t Sn t Sd  S(   Ni    (   s   selfs   _Condition__locks   acquires   releases   Falses   True(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys	   _is_ownedº   s    c         C   sŠ  t  ƒ  |  i ƒ  p
 t d ‚ t ƒ  } | i ƒ  |  i i | ƒ |  i	 ƒ  } z(| t j o) | i ƒ  t o |  i d |  ƒ qtnï t ƒ  | } d } xf t o^ | i d ƒ } | o Pn | t ƒ  } | d j o Pn t | d | d ƒ } t | ƒ qœ W| oL t o |  i d |  | ƒ n y |  i i | ƒ Wqtt j
 o qtXn t o |  i d |  | ƒ n Wd  |  i | ƒ Xd  S(	   Ns   wait() of un-acquire()d locks   %s.wait(): got itf0.00050000000000000001i    i   f0.050000000000000003s   %s.wait(%s): timed outs   %s.wait(%s): got it(   s   currentThreads   selfs	   _is_owneds   AssertionErrors   _allocate_locks   waiters   acquires   _Condition__waiterss   appends   _release_saves   saved_states   timeouts   Nones	   __debug__s   _notes   _times   endtimes   delays   Trues   gotits	   remainings   mins   _sleeps   removes
   ValueErrors   _acquire_restore(   s   selfs   timeouts   delays   gotits   waiters   saved_states   endtimes	   remaining(    (    s&   /mit/python/lib/python2.3/threading.pys   waitÃ   sD    	

 	 i   c         C   sÌ   t  ƒ  |  i ƒ  p
 t d ‚ |  i } | |  } | o# t o |  i d |  ƒ n d  Sn |  i d |  | | d j o d p d ƒ x? | D]7 } | i
 ƒ  y | i | ƒ Wq t j
 o q Xq Wd  S(   Ns   notify() of un-acquire()d locks   %s.notify(): no waiterss"   %s.notify(): notifying %d waiter%si   s   ss    (   s   currentThreads   selfs	   _is_owneds   AssertionErrors   _Condition__waiterss   ns   waiterss	   __debug__s   _notes   waiters   releases   removes
   ValueError(   s   selfs   ns   waiters   _Condition__waiterss   waiters(    (    s&   /mit/python/lib/python2.3/threading.pys   notifyí   s"    	
 
c         C   s   |  i t |  i ƒ ƒ d  S(   N(   s   selfs   notifys   lens   _Condition__waiters(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys	   notifyAllÿ   s    (   s   __name__s
   __module__s   Nones   __init__s   __repr__s   _release_saves   _acquire_restores	   _is_owneds   waits   notifys	   notifyAll(    (    (    s&   /mit/python/lib/python2.3/threading.pys
   _Condition–   s   					*c          O   s   t  |  | Ž  Sd  S(   N(   s
   _Semaphores   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys	   Semaphore  s    s
   _Semaphorec           B   s,   t  Z d e d „ Z d d „ Z d „  Z RS(   Ni   c         C   sF   | d j p
 t d ‚ t i |  | ƒ t t ƒ  ƒ |  _ | |  _	 d  S(   Ni    s$   Semaphore initial value must be >= 0(
   s   values   AssertionErrors   _Verboses   __init__s   selfs   verboses	   Conditions   Locks   _Semaphore__conds   _Semaphore__value(   s   selfs   values   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__
  s    c         C   sµ   t  } |  i i ƒ  xŠ |  i d j oB | o Pn t o |  i d |  | |  i ƒ n |  i i	 ƒ  q W|  i d |  _ t o |  i d |  |  i ƒ n t
 } |  i i ƒ  | Sd  S(   Ni    s)   %s.acquire(%s): blocked waiting, value=%si   s   %s.acquire: success, value=%s(   s   Falses   rcs   selfs   _Semaphore__conds   acquires   _Semaphore__values   blockings	   __debug__s   _notes   waits   Trues   release(   s   selfs   blockings   rc(    (    s&   /mit/python/lib/python2.3/threading.pys   acquire  s"     		c         C   s\   |  i i ƒ  |  i d |  _ t o |  i d |  |  i ƒ n |  i i ƒ  |  i i ƒ  d  S(   Ni   s   %s.release: success, value=%s(   s   selfs   _Semaphore__conds   acquires   _Semaphore__values	   __debug__s   _notes   notifys   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   release#  s    	(   s   __name__s
   __module__s   Nones   __init__s   acquires   release(    (    (    s&   /mit/python/lib/python2.3/threading.pys
   _Semaphore  s   c          O   s   t  |  | Ž  Sd  S(   N(   s   _BoundedSemaphores   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys   BoundedSemaphore-  s    s   _BoundedSemaphorec           B   s&   t  Z d  Z d e d „ Z d „  Z RS(   s6   Semaphore that checks that # releases is <= # acquiresi   c         C   s    t  i |  | | ƒ | |  _ d  S(   N(   s
   _Semaphores   __init__s   selfs   values   verboses   _initial_value(   s   selfs   values   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__2  s    c         C   s1   |  i |  i j o t d ‚ n t i |  ƒ Sd  S(   Ns!   Semaphore released too many times(   s   selfs   _Semaphore__values   _initial_values
   ValueErrors
   _Semaphores   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   release6  s    (   s   __name__s
   __module__s   __doc__s   Nones   __init__s   release(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _BoundedSemaphore0  s    c          O   s   t  |  | Ž  Sd  S(   N(   s   _Events   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys   Event<  s    s   _Eventc           B   s;   t  Z e d „ Z d „  Z d „  Z d „  Z e d „ Z RS(   Nc         C   s/   t  i |  | ƒ t t ƒ  ƒ |  _ t |  _ d  S(   N(	   s   _Verboses   __init__s   selfs   verboses	   Conditions   Locks   _Event__conds   Falses   _Event__flag(   s   selfs   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__C  s    c         C   s   |  i Sd  S(   N(   s   selfs   _Event__flag(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   isSetH  s    c         C   s<   |  i i ƒ  z t |  _ |  i i ƒ  Wd  |  i i ƒ  Xd  S(   N(   s   selfs   _Event__conds   acquires   Trues   _Event__flags	   notifyAlls   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   setK  s    	 c         C   s/   |  i i ƒ  z t |  _ Wd  |  i i ƒ  Xd  S(   N(   s   selfs   _Event__conds   acquires   Falses   _Event__flags   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   clearS  s
     c         C   sE   |  i i ƒ  z# |  i o |  i i | ƒ n Wd  |  i i ƒ  Xd  S(   N(   s   selfs   _Event__conds   acquires   _Event__flags   waits   timeouts   release(   s   selfs   timeout(    (    s&   /mit/python/lib/python2.3/threading.pys   waitZ  s     (   s   __name__s
   __module__s   Nones   __init__s   isSets   sets   clears   wait(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _Event?  s
   			i    s	   Thread-%dc         C   s   t  d a  |  t  Sd  S(   Ni   (   s   _counters   template(   s   template(    (    s&   /mit/python/lib/python2.3/threading.pys   _newnamed  s     
c           B   s¡   t  Z e Z e e e f  h  e d „ Z d „  Z d „  Z d „  Z d „  Z	 d „  Z
 d „  Z d „  Z e d	 „ Z d
 „  Z d „  Z d „  Z d „  Z d „  Z RS(   Nc         C   s›   | t j p
 t d ‚ t i |  | ƒ | |  _ t	 | p t ƒ  ƒ |  _ | |  _ | |  _ |  i ƒ  |  _ t |  _ t |  _ t t ƒ  ƒ |  _ t |  _ d  S(   Ns#   group argument must be None for now(   s   groups   Nones   AssertionErrors   _Verboses   __init__s   selfs   verboses   targets   _Thread__targets   strs   names   _newnames   _Thread__names   argss   _Thread__argss   kwargss   _Thread__kwargss   _set_daemons   _Thread__daemonics   Falses   _Thread__starteds   _Thread__stoppeds	   Conditions   Locks   _Thread__blocks   Trues   _Thread__initialized(   s   selfs   groups   targets   names   argss   kwargss   verbose(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__u  s    					c         C   s   t  ƒ  i ƒ  Sd  S(   N(   s   currentThreads   isDaemon(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   _set_daemonƒ  s    c         C   sx   |  i p
 t d ‚ d } |  i o
 d } n |  i o
 d } n |  i o | d } n d |  i i |  i	 | f Sd  S(   Ns    Thread.__init__() was not calleds   initials   starteds   stoppeds    daemons   <%s(%s, %s)>(
   s   selfs   _Thread__initializeds   AssertionErrors   statuss   _Thread__starteds   _Thread__stoppeds   _Thread__daemonics	   __class__s   __name__s   _Thread__name(   s   selfs   status(    (    s&   /mit/python/lib/python2.3/threading.pys   __repr__‡  s    




c         C   s‰   |  i p
 t d ‚ |  i p
 t d ‚ t o |  i d |  ƒ n t i ƒ  |  t |  <t i	 ƒ  t
 |  i f  ƒ t |  _ t d ƒ d  S(   Ns   Thread.__init__() not calleds   thread already starteds   %s.start(): starting threadf9.9999999999999995e-07(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__starteds	   __debug__s   _notes   _active_limbo_locks   acquires   _limbos   releases   _start_new_threads   _Thread__bootstraps   Trues   _sleep(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   start’  s    


	c         C   s(   |  i o |  i |  i |  i Ž  n d  S(   N(   s   selfs   _Thread__targets   _Thread__argss   _Thread__kwargs(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   runž  s    
c         C   s  zWt  |  _ t i ƒ  |  t t ƒ  <t |  =t i ƒ  t	 o |  i
 d |  ƒ n t o! |  i
 d |  ƒ t i t ƒ n t o! |  i
 d |  ƒ t i t ƒ n y |  i ƒ  Wn‹ t j
 o" t	 o |  i
 d |  ƒ qVnz t	 o |  i
 d |  ƒ n t ƒ  } t d | ƒ t i i d |  i ƒ  | i ƒ  f ƒ n Xt	 o |  i
 d |  ƒ n Wd  |  i ƒ  y |  i ƒ  Wn n XXd  S(	   Ns    %s.__bootstrap(): thread starteds(   %s.__bootstrap(): registering trace hooks*   %s.__bootstrap(): registering profile hooks#   %s.__bootstrap(): raised SystemExits%   %s.__bootstrap(): unhandled exceptions   files   Exception in thread %s:
%s
s   %s.__bootstrap(): normal return(   s   Trues   selfs   _Thread__starteds   _active_limbo_locks   acquires   _actives
   _get_idents   _limbos   releases	   __debug__s   _notes   _trace_hooks   _syss   settraces   _profile_hooks
   setprofiles   runs
   SystemExits	   _StringIOs   ss
   _print_excs   stderrs   writes   getNames   getvalues   _Thread__stops   _Thread__delete(   s   selfs   s(    (    s&   /mit/python/lib/python2.3/threading.pys   __bootstrap¢  sB    	

	* 
c         C   s4   |  i i ƒ  t |  _ |  i i ƒ  |  i i ƒ  d  S(   N(   s   selfs   _Thread__blocks   acquires   Trues   _Thread__stoppeds	   notifyAlls   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   __stopÉ  s    	c         C   s"   t  i ƒ  t t ƒ  =t  i ƒ  d  S(   N(   s   _active_limbo_locks   acquires   _actives
   _get_idents   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   __deleteÏ  s    

c         C   s[  |  i p
 t d ‚ |  i p
 t d ‚ |  t ƒ  j	 p
 t d ‚ t o# |  i o |  i d |  ƒ ql n |  i i	 ƒ  | t j o? x |  i o |  i i ƒ  q‰ Wt o |  i d |  ƒ qJn† t ƒ  | } xu |  i oN | t ƒ  } | d j o  t o |  i d |  ƒ n Pn |  i i | ƒ qÕ Wt o |  i d |  ƒ n |  i i ƒ  d  S(   Ns   Thread.__init__() not calleds'   cannot join thread before it is starteds   cannot join current threads%   %s.join(): waiting until thread stopss   %s.join(): thread stoppedi    s   %s.join(): timed out(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__starteds   currentThreads	   __debug__s   _Thread__stoppeds   _notes   _Thread__blocks   acquires   timeouts   Nones   waits   _times   deadlines   delays   release(   s   selfs   timeouts   delays   deadline(    (    s&   /mit/python/lib/python2.3/threading.pys   joinÔ  s2      c         C   s   |  i p
 t d ‚ |  i Sd  S(   Ns   Thread.__init__() not called(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__name(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   getNameï  s    c         C   s'   |  i p
 t d ‚ t | ƒ |  _ d  S(   Ns   Thread.__init__() not called(   s   selfs   _Thread__initializeds   AssertionErrors   strs   names   _Thread__name(   s   selfs   name(    (    s&   /mit/python/lib/python2.3/threading.pys   setNameó  s    c         C   s*   |  i p
 t d ‚ |  i o |  i Sd  S(   Ns   Thread.__init__() not called(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__starteds   _Thread__stopped(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   isAlive÷  s    c         C   s   |  i p
 t d ‚ |  i Sd  S(   Ns   Thread.__init__() not called(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__daemonic(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   isDaemonû  s    c         C   s6   |  i p
 t d ‚ |  i p
 t d ‚ | |  _ d  S(   Ns   Thread.__init__() not calleds)   cannot set daemon status of active thread(   s   selfs   _Thread__initializeds   AssertionErrors   _Thread__starteds   daemonics   _Thread__daemonic(   s   selfs   daemonic(    (    s&   /mit/python/lib/python2.3/threading.pys	   setDaemonÿ  s    (   s   __name__s
   __module__s   Falses   _Thread__initializeds   Nones   __init__s   _set_daemons   __repr__s   starts   runs   _Thread__bootstraps   _Thread__stops   _Thread__deletes   joins   getNames   setNames   isAlives   isDaemons	   setDaemon(    (    (    s&   /mit/python/lib/python2.3/threading.pys   Threadq  s   					'						c          O   s   t  |  | Ž  Sd  S(   N(   s   _Timers   argss   kwargs(   s   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys   Timer  s    s   _Timerc           B   s/   t  Z d  Z g  h  d „ Z d „  Z d „  Z RS(   s²   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  i |  ƒ | |  _ | |  _ | |  _ | |  _ t ƒ  |  _ d  S(   N(	   s   Threads   __init__s   selfs   intervals   functions   argss   kwargss   Events   finished(   s   selfs   intervals   functions   argss   kwargs(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__  s    				c         C   s   |  i i ƒ  d S(   s(   Stop the timer if it hasn't finished yetN(   s   selfs   finisheds   set(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   cancel  s     c         C   sO   |  i i |  i ƒ |  i i ƒ  o |  i |  i |  i Ž  n |  i i ƒ  d  S(   N(	   s   selfs   finisheds   waits   intervals   isSets   functions   argss   kwargss   set(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   run  s    (   s   __name__s
   __module__s   __doc__s   __init__s   cancels   run(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _Timer	  s    	s   _MainThreadc           B   s#   t  Z d „  Z d „  Z d „  Z RS(   Nc         C   sZ   t  i |  d d ƒt |  _ t i ƒ  |  t t ƒ  <t i	 ƒ  d  k
 } | i |  i ƒ d  S(   Ns   names
   MainThread(   s   Threads   __init__s   selfs   Trues   _Thread__starteds   _active_limbo_locks   acquires   _actives
   _get_idents   releases   atexits   registers   _MainThread__exitfunc(   s   selfs   atexit(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__(  s    	

	c         C   s   t  Sd  S(   N(   s   False(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   _set_daemon1  s    c         C   s„   |  i ƒ  t ƒ  } | o t o |  i d |  ƒ q9 n x | o | i ƒ  t ƒ  } q< Wt o |  i d |  ƒ n |  i ƒ  d  S(   Ns   %s: waiting for other threadss   %s: exiting(   s   selfs   _Thread__stops   _pickSomeNonDaemonThreads   ts	   __debug__s   _notes   joins   _Thread__delete(   s   selfs   t(    (    s&   /mit/python/lib/python2.3/threading.pys
   __exitfunc4  s    
	 
(   s   __name__s
   __module__s   __init__s   _set_daemons   _MainThread__exitfunc(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _MainThread&  s   			c          C   s?   x4 t  ƒ  D]) }  |  i ƒ  o
 |  i ƒ  o |  Sq
 q
 Wt Sd  S(   N(   s	   enumerates   ts   isDaemons   isAlives   None(   s   t(    (    s&   /mit/python/lib/python2.3/threading.pys   _pickSomeNonDaemonThreadA  s
    
 s   _DummyThreadc           B   s&   t  Z d „  Z d „  Z e d „ Z RS(   Nc         C   sG   t  i |  d t d ƒ ƒt |  _ t i ƒ  |  t t	 ƒ  <t i
 ƒ  d  S(   Ns   names   Dummy-%d(   s   Threads   __init__s   selfs   _newnames   Trues   _Thread__starteds   _active_limbo_locks   acquires   _actives
   _get_idents   release(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__Q  s
    	
c         C   s   t  Sd  S(   N(   s   True(   s   self(    (    s&   /mit/python/lib/python2.3/threading.pys   _set_daemonX  s    c         C   s   t  p
 t d ‚ d  S(   Ns   cannot join a dummy thread(   s   Falses   AssertionError(   s   selfs   timeout(    (    s&   /mit/python/lib/python2.3/threading.pys   join[  s    (   s   __name__s
   __module__s   __init__s   _set_daemons   Nones   join(    (    (    s&   /mit/python/lib/python2.3/threading.pys   _DummyThreadO  s   		c           C   s0   y t  t ƒ  SWn t j
 o t ƒ  Sn Xd  S(   N(   s   _actives
   _get_idents   KeyErrors   _DummyThread(    (    (    s&   /mit/python/lib/python2.3/threading.pys   currentThreada  s    c          C   s2   t  i ƒ  t t ƒ t t ƒ }  t  i ƒ  |  Sd  S(   N(   s   _active_limbo_locks   acquires   lens   _actives   _limbos   counts   release(   s   count(    (    s&   /mit/python/lib/python2.3/threading.pys   activeCounth  s    

c          C   s2   t  i ƒ  t i ƒ  t i ƒ  }  t  i ƒ  |  Sd  S(   N(   s   _active_limbo_locks   acquires   _actives   valuess   _limbos   actives   release(   s   active(    (    s&   /mit/python/lib/python2.3/threading.pys	   enumeraten  s    

c          C   s  d t  f d „  ƒ  Y} d t f d „  ƒ  Y} d t f d „  ƒ  Y} d }	 d }
 d	 }  | |
 ƒ } g  } xE t
 |	 ƒ D]7 } | | |  ƒ } | i d
 | d ƒ | i | ƒ qs W| | |  |	 ƒ } x" | D] } | i ƒ  t d ƒ qÈ W| i ƒ  x | D] } | i ƒ  q÷ W| i ƒ  d  S(   Ns   BoundedQueuec           B   s#   t  Z d „  Z d „  Z d „  Z RS(   Nc         C   sS   t  i |  ƒ t ƒ  |  _ t |  i ƒ |  _ t |  i ƒ |  _ | |  _ g  |  _	 d  S(   N(
   s   _Verboses   __init__s   selfs   RLocks   mons	   Conditions   rcs   wcs   limits   queue(   s   selfs   limit(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__  s    	c         C   s•   |  i i ƒ  x; t |  i ƒ |  i j o! |  i d | ƒ |  i i	 ƒ  q W|  i i
 | ƒ |  i d | t |  i ƒ ƒ |  i i ƒ  |  i i ƒ  d  S(   Ns   put(%s): queue fulls    put(%s): appended, length now %d(   s   selfs   mons   acquires   lens   queues   limits   _notes   items   wcs   waits   appends   rcs   notifys   release(   s   selfs   item(    (    s&   /mit/python/lib/python2.3/threading.pys   put‡  s     	c         C   sŠ   |  i i ƒ  x* |  i o |  i d ƒ |  i i ƒ  q W|  i i d ƒ } |  i d | t	 |  i ƒ ƒ |  i
 i ƒ  |  i i ƒ  | Sd  S(   Ns   get(): queue emptyi    s   get(): got %s, %d left(   s   selfs   mons   acquires   queues   _notes   rcs   waits   pops   items   lens   wcs   notifys   release(   s   selfs   item(    (    s&   /mit/python/lib/python2.3/threading.pys   get’  s     (   s   __name__s
   __module__s   __init__s   puts   get(    (    (    s&   /mit/python/lib/python2.3/threading.pys   BoundedQueue}  s   		s   ProducerThreadc           B   s   t  Z d „  Z d „  Z RS(   Nc         C   s)   t  i |  d d ƒ| |  _ | |  _ d  S(   Ns   names   Producer(   s   Threads   __init__s   selfs   queues   quota(   s   selfs   queues   quota(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__Ÿ  s    	c         C   sj   d k  l  } d } xP | |  i j  o? | d } |  i i d |  i ƒ  | f ƒ t | ƒ  d ƒ q Wd  S(   N(   s   randomi    i   s   %s.%df1.0000000000000001e-05(   s   randoms   counters   selfs   quotas   queues   puts   getNames   _sleep(   s   selfs   randoms   counter(    (    s&   /mit/python/lib/python2.3/threading.pys   run¤  s     
 (   s   __name__s
   __module__s   __init__s   run(    (    (    s&   /mit/python/lib/python2.3/threading.pys   ProducerThread  s   	s   ConsumerThreadc           B   s   t  Z d „  Z d „  Z RS(   Nc         C   s)   t  i |  d d ƒ| |  _ | |  _ d  S(   Ns   names   Consumer(   s   Threads   __init__s   selfs   queues   count(   s   selfs   queues   count(    (    s&   /mit/python/lib/python2.3/threading.pys   __init__¯  s    	c         C   s@   x9 |  i d j o( |  i i ƒ  } | GH|  i d |  _ q Wd  S(   Ni    i   (   s   selfs   counts   queues   gets   item(   s   selfs   item(    (    s&   /mit/python/lib/python2.3/threading.pys   run´  s
     (   s   __name__s
   __module__s   __init__s   run(    (    (    s&   /mit/python/lib/python2.3/threading.pys   ConsumerThread­  s   	i   i   i   s   Producer-%di   f9.9999999999999995e-07(   s   _Verboses   BoundedQueues   Threads   ProducerThreads   ConsumerThreads   NPs   QLs   NIs   Qs   Ps   ranges   is   ts   setNames   appends   Cs   starts   _sleeps   join(   s   NIs   Cs   ProducerThreads   is   BoundedQueues   Ps   ConsumerThreads   Qs   ts   NPs   QL(    (    s&   /mit/python/lib/python2.3/threading.pys   _test{  s.       

 s   __main__(=   s   __doc__s   syss   _syss   threads   ImportErrors   moduless   __name__s   StringIOs	   _StringIOs   times   _times   sleeps   _sleeps	   tracebacks	   print_excs
   _print_excs   __all__s   start_new_threads   _start_new_threads   allocate_locks   _allocate_locks	   get_idents
   _get_idents   errors   ThreadErrors   Falses   _VERBOSEs	   __debug__s   objects   _Verboses   Nones   _profile_hooks   _trace_hooks
   setprofiles   settraces   Locks   RLocks   _RLocks	   Conditions
   _Conditions	   Semaphores
   _Semaphores   BoundedSemaphores   _BoundedSemaphores   Events   _Events   _counters   _newnames   _active_limbo_locks   _actives   _limbos   Threads   Timers   _Timers   _MainThreads   _pickSomeNonDaemonThreads   _DummyThreads   currentThreads   activeCounts	   enumerates   _test((   s   _BoundedSemaphores   currentThreads   _tests	   Semaphores	   _StringIOs   activeCounts   _sleeps   ThreadErrors   _start_new_threads   BoundedSemaphores   __all__s
   _print_excs   _Events   _Timers   _RLocks   _active_limbo_locks	   Conditions   _Verboses   settraces   _DummyThreads   Threads
   _Conditions
   _get_idents
   setprofiles   RLocks	   enumerates   Timers
   _Semaphores   _newnames   threads   _pickSomeNonDaemonThreads   _limbos   Locks   _actives   _MainThreads   _syss   _times   _allocate_locks   Events   _VERBOSE(    (    s&   /mit/python/lib/python2.3/threading.pys   ?   sh   	
-								D	m	'		$	•						R