[Zodb-checkins] CVS: Zope3/src/ThreadedAsync - LoopCallback.py:1.13

Stephan Richter srichter at cosmos.phy.tufts.edu
Tue Mar 23 10:51:55 EST 2004


Update of /cvs-repository/Zope3/src/ThreadedAsync
In directory cvs.zope.org:/tmp/cvs-serv1540/src/ThreadedAsync

Modified Files:
	LoopCallback.py 
Log Message:


Provide a way to shutdown the servers using an exit status.




=== Zope3/src/ThreadedAsync/LoopCallback.py 1.12 => 1.13 ===
--- Zope3/src/ThreadedAsync/LoopCallback.py:1.12	Fri Jan  2 16:16:49 2004
+++ Zope3/src/ThreadedAsync/LoopCallback.py	Tue Mar 23 10:51:53 2004
@@ -150,6 +150,9 @@
     except that it also triggers ThreadedAsync callback functions
     before starting the loop.
     """
+    global exit_status
+    exit_status = None
+
     if use_poll:
         if hasattr(select, 'poll'):
             poll_fun = asyncore.poll3
@@ -162,10 +165,10 @@
         map = asyncore.socket_map
 
     _start_loop(map)
-    while map:
+    while map and exit_status is None:
         poll_fun(timeout, map)
     _stop_loop()
-
+    
 
 # This module used to do something evil -- it rebound asyncore.loop to the
 # above loop() function.  What was evil about this is that if you added some




More information about the Zodb-checkins mailing list