-í D;(>csÏdZdkZdklZdklZlZdkZdk l Z ddZ dei fd„ƒYZ *d e fd „ƒYZ@d e fd „ƒYZLd fd„ƒYZdS(s)Compromising positions involving threads.N(s Transaction(s zodb_picklesMinPO(sClientDisconnectedsis BasicThreadcs#tZd„Z%d„ZRS(Ncsu||_tƒ|_||_||_ d|_!d|_"ti i |ƒ#|i dƒdS(Nii( sstoragesselfs Transactionstranss doNextEventsthreadStartedEvents gotValueErrorsgotDisconnecteds threadingsThreads__init__s setDaemon(sselfsstorages doNextEventsthreadStartedEvent((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys__init__s     cs<%&tii|dƒ'to|iƒ pt‚dS(Ni (s threadingsThreadsjoinsselfs __debug__sisAlivesAssertionError(sself((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pysjoin%s(s__name__s __module__s__init__sjoin(((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys BasicThreads  sGetsThroughVoteThreadcs*tZ2d„ZRS(Ncsô23|ii|iƒ4|iiƒ}5|ii|ttt dƒƒd|iƒ6|ii |iƒ7|i i ƒ8|i idƒ9y:|ii|iƒWn>;tiij o)<d|_=|ii|iƒnXdS(Nscsi i(sselfsstorages tpc_beginstranssnew_oidsoidsstoresZEROs zodb_picklesMinPOstpc_votesthreadStartedEventssets doNextEventswaits tpc_finishsZEOs ClientStoragesClientStorageErrors gotValueErrors tpc_abort(sselfsoid((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pysrun2s. (s__name__s __module__srun(((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pysGetsThroughVoteThread*s sGetsThroughBeginThreadcs@tZEd„ZRS(NcsOEFyG|ii|iƒWn(Htiij oId|_nXdS(Ni(sselfsstorages tpc_beginstranssZEOs ClientStoragesClientStorageErrors gotValueError(sself((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pysrunEs(s__name__s __module__srun(((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pysGetsThroughBeginThread@s s ThreadTestscs;LtZPd„Zad„Zsd„Zd„ZRS(NcsPQtiƒ}Rtiƒ}St|iT||ƒ}U|iƒV|i dƒW|ii ƒX|i ƒY|i ƒZ|i |idƒdS(Ni i(s threadingsEvents doNextEventsthreadStartedEventsGetsThroughVoteThreadsselfs_storagesthread1sstartswaitsclosessetsjoins assertEquals gotValueError(sselfsthread1s doNextEventsthreadStartedEvent((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pyscheckDisconnectedOnThread2ClosePs    csèabtiƒ}ctiƒ}dt|ie||ƒ}ft|ig||ƒ}h|i ƒi|i dƒj|i ƒk|ii ƒl|i ƒm|iƒn|iƒo|i|idƒp|i|idƒdS(Ni(s threadingsEvents doNextEventsthreadStartedEventsGetsThroughVoteThreadsselfs_storagesthread1sGetsThroughBeginThreadsthread2sstartswaitsclosessetsjoins assertEquals gotValueError(sselfsthread2sthread1s doNextEventsthreadStartedEvent((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pyscheckSecondBeginFailsas       cs·stg}uxLtdƒDu];}vtid|iƒ}w|i|ƒx|i ƒqWyx!|Dy]}z|i dƒqhW{x(|D{]}||i |i ƒ ƒqWdS(Nistargeti( sthreadssrangesis threadingsThreadsselfs mtstorehelperstsappendsstartsjoins failUnlesssisAlive(sselfsthreadsstsi((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys checkMTStoresss    csœ€tiƒiƒ}g}‚xGtdƒD‚]6}ƒ|itddƒƒ„|itdƒƒq1W…x$|D…]}†|i d|ƒqxWdS(Ni sXi@ sdata( s threadings currentThreadsgetNamesnamesobjssrangesisappendsMinPOsobjsselfs_dostore(sselfsobjsnamesisobjs((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys mtstorehelpers   (s__name__s __module__scheckDisconnectedOnThread2ClosescheckSecondBeginFailss checkMTStoress mtstorehelper(((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys ThreadTestsLs    (s__doc__s threadingsZODB.Transactions TransactionsZODB.tests.StorageTestBases zodb_picklesMinPOsZEO.ClientStoragesZEOsZEO.ExceptionssClientDisconnectedsZEROsThreads BasicThreadsGetsThroughVoteThreadsGetsThroughBeginThreads ThreadTests( s TransactionsClientDisconnecteds zodb_picklesGetsThroughBeginThreads ThreadTestssZEOs threadingsZEROsGetsThroughVoteThreads BasicThreadsMinPO((s=/usr/pkg/lib/python2.2/site-packages/ZEO/tests/ThreadTests.pys?s