[Zodb-checkins] CVS: ZODB3/ThreadedAsync - __init__.py:1.7 LoopCallback.py:1.9

Jeremy Hylton jeremy at zope.com
Thu Oct 2 14:17:57 EDT 2003


Update of /cvs-repository/ZODB3/ThreadedAsync
In directory cvs.zope.org:/tmp/cvs-serv18770/ThreadedAsync

Modified Files:
	__init__.py LoopCallback.py 
Log Message:
Merge changes from Zope-2_7-branch to the trunk.


=== ZODB3/ThreadedAsync/__init__.py 1.6 => 1.7 ===
--- ZODB3/ThreadedAsync/__init__.py:1.6	Tue Feb 25 10:17:09 2003
+++ ZODB3/ThreadedAsync/__init__.py	Thu Oct  2 14:17:26 2003
@@ -16,4 +16,4 @@
 $Id$
 """
 
-from LoopCallback import register_loop_callback, loop
+from LoopCallback import register_loop_callback, loop, remove_loop_callback


=== ZODB3/ThreadedAsync/LoopCallback.py 1.8 => 1.9 ===
--- ZODB3/ThreadedAsync/LoopCallback.py:1.8	Thu Dec 12 16:15:42 2002
+++ ZODB3/ThreadedAsync/LoopCallback.py	Thu Oct  2 14:17:26 2003
@@ -57,7 +57,17 @@
             _loop_callbacks.append((callback, args, kw))
     finally:
         _loop_lock.release()
-
+        
+def remove_loop_callback(callback):
+    """Remove a callback function registered earlier.
+  	 
+    This is useful if loop() was never called.
+    """
+    for i in range(len(_loop_callbacks)):
+        if _loop_callbacks[i][0] == callback:
+            del _loop_callbacks[i]
+            return
+  	 
 def _start_loop(map):
     _loop_lock.acquire()
     try:




More information about the Zodb-checkins mailing list