[Zodb-checkins] CVS: Zope/lib/python/ThreadedAsync - LoopCallback.py:1.11

Jim Fulton cvs-admin at zope.org
Fri Nov 28 11:45:28 EST 2003


Update of /cvs-repository/Zope/lib/python/ThreadedAsync
In directory cvs.zope.org:/tmp/cvs-serv3783/lib/python/ThreadedAsync

Modified Files:
	LoopCallback.py 
Log Message:
Merged Jeremy and Tim's changes from the zodb33-devel-branch.


=== Zope/lib/python/ThreadedAsync/LoopCallback.py 1.10 => 1.11 ===
--- Zope/lib/python/ThreadedAsync/LoopCallback.py:1.10	Thu Oct  2 18:14:01 2003
+++ Zope/lib/python/ThreadedAsync/LoopCallback.py	Fri Nov 28 11:44:57 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