-í
D;(>c       sÏ     d  Z    d k Z  d k l Z  d k l Z l Z  d k Z  d k	 l
 Z
  d d Z  d e i f d „  ƒ  YZ * d	 e f d
 „  ƒ  YZ @ d e f d „  ƒ  YZ L d f  d „  ƒ  YZ d S(   s)   Compromising positions involving threads.N(   s   Transaction(   s   zodb_pickles   MinPO(   s   ClientDisconnecteds    i   s   BasicThreadc      s#    t  Z  d „  Z % d „  Z RS(   Nc    su     | |  _   t ƒ  |  _  | |  _  | |  _   d |  _ ! d |  _ " t i	 i
 |  ƒ # |  i d ƒ d  S(   Ni    i   (   s   storages   selfs   Transactions   transs   doNextEvents   threadStartedEvents   gotValueErrors   gotDisconnecteds	   threadings   Threads   __init__s	   setDaemon(   s   selfs   storages   doNextEvents   threadStartedEvent(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   __init__ s   c    s<   % & t  i i |  d ƒ ' t o |  i ƒ  p t ‚ d  S(   Ni
   (   s	   threadings   Threads   joins   selfs	   __debug__s   isAlives   AssertionError(   s   self(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   join% s   (   s   __name__s
   __module__s   __init__s   join(    (    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   BasicThread s   	
s   GetsThroughVoteThreadc      s   * t  Z 2 d „  Z RS(   Nc    sô   2 3 |  i i |  i ƒ 4 |  i i ƒ  } 5 |  i i | t t t	 d ƒ ƒ d |  i ƒ 6 |  i i
 |  i ƒ 7 |  i i ƒ  8 |  i i d ƒ 9 y : |  i i |  i ƒ Wn> ; t i i j
 o) < d |  _ = |  i i |  i ƒ n Xd  S(   Ns   cs    i
   i   (   s   selfs   storages	   tpc_begins   transs   new_oids   oids   stores   ZEROs   zodb_pickles   MinPOs   tpc_votes   threadStartedEvents   sets   doNextEvents   waits
   tpc_finishs   ZEOs   ClientStorages   ClientStorageErrors   gotValueErrors	   tpc_abort(   s   selfs   oid(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   run2 s   .(   s   __name__s
   __module__s   run(    (    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   GetsThroughVoteThread* s   	s   GetsThroughBeginThreadc      s   @ t  Z E d „  Z RS(   Nc    sO   E F y G |  i i |  i ƒ Wn( H t i i j
 o I d |  _ n Xd  S(   Ni   (   s   selfs   storages	   tpc_begins   transs   ZEOs   ClientStorages   ClientStorageErrors   gotValueError(   s   self(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   runE s   (   s   __name__s
   __module__s   run(    (    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   GetsThroughBeginThread@ s   	s   ThreadTestsc      s;   L t  Z P d „  Z a d „  Z s d „  Z  d „  Z RS(   Nc    s   P Q t  i ƒ  } R t  i ƒ  } S t |  i T | | ƒ } U | i ƒ  V | i	 d ƒ W |  i i
 ƒ  X | i ƒ  Y | i ƒ  Z |  i | i d ƒ d  S(   Ni
   i   (   s	   threadings   Events   doNextEvents   threadStartedEvents   GetsThroughVoteThreads   selfs   _storages   thread1s   starts   waits   closes   sets   joins   assertEquals   gotValueError(   s   selfs   thread1s   doNextEvents   threadStartedEvent(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   checkDisconnectedOnThread2CloseP s   c    sè   a b t  i ƒ  } c t  i ƒ  } d t |  i e | | ƒ } f t |  i g | | ƒ } h | i
 ƒ  i | i d ƒ j | i
 ƒ  k |  i i ƒ  l | i ƒ  m | i ƒ  n | i ƒ  o |  i | i d ƒ p |  i | i d ƒ d  S(   Ni   (   s	   threadings   Events   doNextEvents   threadStartedEvents   GetsThroughVoteThreads   selfs   _storages   thread1s   GetsThroughBeginThreads   thread2s   starts   waits   closes   sets   joins   assertEquals   gotValueError(   s   selfs   thread2s   thread1s   doNextEvents   threadStartedEvent(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   checkSecondBeginFailsa s   c    s·   s t g  } u xL t d ƒ Du ]; } v t i d |  i ƒ } w | i | ƒ x | i	 ƒ  q Wy x! | Dy ] } z | i
 d ƒ qh W{ x( | D{ ] } | |  i | i ƒ  ƒ q Wd  S(   Ni   s   targeti   (   s   threadss   ranges   is	   threadings   Threads   selfs   mtstorehelpers   ts   appends   starts   joins
   failUnlesss   isAlive(   s   selfs   threadss   ts   i(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   checkMTStoress s   	 	
 	
 	c    sœ    € t  i ƒ  i ƒ  }  g  } ‚ xG t d ƒ D‚ ]6 } ƒ | i t d d ƒ ƒ „ | i t d ƒ ƒ q1 W… x$ | D… ] } † |  i d | ƒ qx Wd  S(   Ni
   s   Xi@ s   data(   s	   threadings   currentThreads   getNames   names   objss   ranges   is   appends   MinPOs   objs   selfs   _dostore(   s   selfs   objs   names   is   objs(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   mtstorehelper s   	 	
 	(   s   __name__s
   __module__s   checkDisconnectedOnThread2Closes   checkSecondBeginFailss   checkMTStoress   mtstorehelper(    (    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   ThreadTestsL s   	(   s   __doc__s	   threadings   ZODB.Transactions   Transactions   ZODB.tests.StorageTestBases   zodb_pickles   MinPOs   ZEO.ClientStorages   ZEOs   ZEO.Exceptionss   ClientDisconnecteds   ZEROs   Threads   BasicThreads   GetsThroughVoteThreads   GetsThroughBeginThreads   ThreadTests(   s   Transactions   ClientDisconnecteds   zodb_pickles   GetsThroughBeginThreads   ThreadTestss   ZEOs	   threadings   ZEROs   GetsThroughVoteThreads   BasicThreads   MinPO(    (    s=   /usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys   ? s   