[Checkins] SVN: zc.twist/trunk/src/zc/twist/README.txt Try to make thread-based tests work on another machine.

Gary Poster gary at zope.com
Wed Aug 16 21:01:31 EDT 2006


Log message for revision 69576:
  Try to make thread-based tests work on another machine.
  

Changed:
  U   zc.twist/trunk/src/zc/twist/README.txt

-=-
Modified: zc.twist/trunk/src/zc/twist/README.txt
===================================================================
--- zc.twist/trunk/src/zc/twist/README.txt	2006-08-16 22:39:30 UTC (rev 69575)
+++ zc.twist/trunk/src/zc/twist/README.txt	2006-08-17 01:01:30 UTC (rev 69576)
@@ -357,10 +357,12 @@
     ...         self.thread.start()
     ...         _main.acquire()
     ...     def run(self):
+    ...         self.running = True
     ...         self.result = self.call()
     ...         assert _main.locked()
     ...         assert _thread.locked()
     ...         _thread.release()
+    ...         self.running = False
     ...         _main.release()
     ...     def retry(self):
     ...         assert _thread.locked()
@@ -368,11 +370,10 @@
     ...         _main.acquire()
     ...     def resume(self, retry=True):
     ...         if retry:
-    ...             while _thread.locked():
+    ...             while self.running:
     ...                 self.retry()
-    ...         else:
-    ...             while self.thread.isAlive():
-    ...                 pass
+    ...         while self.thread.isAlive():
+    ...             pass
     ...         assert not _thread.locked()
     ...         assert _main.locked()
     ...         _main.release()



More information about the Checkins mailing list