‡Æ
†Nö9c       sC  d  k  l Z d k Z d k Z d k Z e i ƒ  Z e i ƒ  Z d Z e i ƒ  Z	 e	 i
 ƒ  d Z d „  Z d Z d „  Z x e e ƒ d r Z e ƒ  q‰ Wd GHe	 i
 ƒ  d GHd f  d	 „  ƒ  YZ d
 Z d „  Z d GHe	 i
 d ƒ o e d ‚ n e e ƒ Z e Z x) e e ƒ d r Z e i e e f ƒ qWe	 i
 ƒ  d GHd S(   (   s   verboseNi    i
   c    s¯   t  i ƒ  t i ƒ  t } t  i ƒ  t o" d G|  Gd Gt | d ƒ Gd GHn t	 i
 | ƒ t o d G|  Gd GHn t i ƒ  t d a t d j o t i ƒ  n t i ƒ  d  S(   Ns   tasks   will run fori   s   secs   donei    (   s   rmutexs   acquires   randoms   numtaskss   delays   releases   verboses   idents   rounds   times   sleeps   mutexs   runnings   done(   s   idents   delays-   /mit/python/lib/python2.0/test/test_thread.pys   task s     

"

c      sS   t  i ƒ  t d a t o d Gt GHn t i t t f ƒ t d a t  i ƒ  d  S(   Ni   s   creating task(	   s   mutexs   acquires
   next_idents   verboses   threads   start_new_threads   tasks   runnings   release(    s-   /mit/python/lib/python2.0/test/test_thread.pys   newtask# s     


s!   waiting for all tasks to completes   all tasks dones   barrierc      s   d „  Z  d „  Z RS(   Nc    sA   | |  _  d |  _ t i ƒ  |  _ t i ƒ  |  _ |  i i ƒ  d  S(   Ni    (   s   ns   selfs   waitings   threads   allocate_locks   checkins   checkouts   acquire(   s   selfs   ns-   /mit/python/lib/python2.0/test/test_thread.pys   __init__5 s
    		c    s»   |  i |  i f \ } } | i ƒ  |  i d |  _ |  i |  i j o" |  i d |  _ | i ƒ  d  Sn | i ƒ  | i ƒ  |  i d |  _ |  i d j o | i ƒ  d  Sn | i ƒ  d  S(   Ni   i    (   s   selfs   checkins   checkouts   acquires   waitings   ns   release(   s   selfs   checkins   checkouts-   /mit/python/lib/python2.0/test/test_thread.pys   enter< s    




(   s   __init__s   enter(    s-   /mit/python/lib/python2.0/test/test_thread.pys   barrier4 s    	i   c    s	  xÉ t  t ƒ d r¹ } |  d j o
 d } n% t i ƒ  t i ƒ  t } t i	 ƒ  t
 o" d G|  Gd Gt | d ƒ Gd GHn t i | ƒ t
 o d G|  Gd G| GHn t i ƒ  t
 o d G|  Gd G| GHn q Wt i ƒ  t d a t d j o t i	 ƒ  n t i	 ƒ  d  S(	   Ni    f0.001s   tasks   will run fori   s   secs   entering barriers   leaving barrier(   s   ranges   numtripss   is   idents   delays   rmutexs   acquires   randoms   numtaskss   releases   verboses   rounds   times   sleeps   bars   enters   mutexs   runnings   done(   s   idents   is   delays-   /mit/python/lib/python2.0/test/test_thread.pys   task2O s*      


"


s   
*** Barrier Test ***s$   'done' should have remained acquired(   s   test_supports   verboses   randoms   threads   times   allocate_locks   mutexs   rmutexs   runnings   dones   acquires   numtaskss   tasks
   next_idents   newtasks   ranges   is   barriers   numtripss   task2s
   ValueErrors   bars   start_new_thread(    s-   /mit/python/lib/python2.0/test/test_thread.pys   ? s>   			
		
 
	 
