Commit a905d79e authored by Jim Fulton's avatar Jim Fulton

Fixed type in loop callback that causes an error if the async main loop

is already running.
parent 188fbff3
......@@ -84,7 +84,7 @@
##############################################################################
"""Utility module to help manage the asyncore mainloop in a multi-threaded app
"""
__version__='$Revision: 1.2 $'[11:-2]
__version__='$Revision: 1.3 $'[11:-2]
import thread
import asyncore
......@@ -96,7 +96,7 @@ _loop_callbacks=[]
def register_loop_callback(callback, args=(), kw=None):
_loop_lock.acquire()
try:
if _looping: apply(cb, (map,)+args, kw or {})
if _looping: apply(callback, (map,)+args, kw or {})
else: _loop_callbacks.append((callback, args, kw))
finally: _loop_lock.release()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment