[Zope-Checkins] CVS: StandaloneZODB/ThreadedAsync - LoopCallback.py:1.2.8.3

Jeremy Hylton jeremy@zope.com
Thu, 17 Jan 2002 23:52:44 -0500


Update of /cvs-repository/StandaloneZODB/ThreadedAsync
In directory cvs.zope.org:/tmp/cvs-serv330/ThreadedAsync

Modified Files:
      Tag: Standby-branch
	LoopCallback.py 
Log Message:
Track changes in name and signatures of StorageServer.

Add mystery clear() call to guarantee that the asyncore loop() will
return.  This is/would be a bug because it leaks sockets, but the
process is about to exit anyway.


=== StandaloneZODB/ThreadedAsync/LoopCallback.py 1.2.8.2 => 1.2.8.3 ===
     try:
         if _looping is not None:
-            apply(callback, (_looping,) + args, kw or {})
+            callback(_looping, *args, **(kw or {}))
         else:
             _loop_callbacks.append((callback, args, kw))
     finally:
@@ -63,7 +63,7 @@
         _looping = map
         while _loop_callbacks:
             cb, args, kw = _loop_callbacks.pop()
-            apply(cb, (map,) + args, kw or {})
+            cb(map, *args, **(kw or {}))
     finally:
         _loop_lock.release()
 
@@ -106,4 +106,4 @@
 # Well, the thing is, we want to work with other asyncore aware
 # code. In particular, we don't necessarily want to make someone
 # import this module just to start or loop.
-# 
+