[Zodb-checkins] CVS: ZODB3/ThreadedAsync - LoopCallback.py:1.10.2.1

Jeremy Hylton jeremy at zope.com
Tue Dec 23 14:06:42 EST 2003


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

Modified Files:
      Tag: ZODB3-mvcc-2-branch
	LoopCallback.py 
Log Message:
Merge the head to the mvcc branch.

This merge should be the final preparation for merging the branch to
the trunk.


=== ZODB3/ThreadedAsync/LoopCallback.py 1.10 => 1.10.2.1 ===
--- ZODB3/ThreadedAsync/LoopCallback.py:1.10	Thu Oct  2 18:14:01 2003
+++ ZODB3/ThreadedAsync/LoopCallback.py	Tue Dec 23 14:06:10 2003
@@ -37,6 +37,16 @@
 _looping = None
 _loop_callbacks = []
 
+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 register_loop_callback(callback, args=(), kw=None):
     """Register callback function to be called when mainloop starts
 




More information about the Zodb-checkins mailing list