Classes | |
class | AsyncMethod |
class | AsyncInterface |
Functions | |
def | async_caller |
def EventLooper::async::async_caller | ( | obj, | ||
inbox, | ||||
outbox | ||||
) |
Accept messages, convert to method calls on given object, pass return value as message.
Definition at line 6 of file async.py.
00006 : 00007 ''' 00008 00009 Accept messages, convert to method calls on given object, pass 00010 return value as message. 00011 00012 ''' 00013 while True: 00014 msg = inbox.get(block=True) 00015 methname, methnumber, args, kwds = msg 00016 if methname == 'async_caller_exit': 00017 break 00018 meth = eval("obj.%s"%methname) 00019 ret = meth(*args, **kwds) 00020 outbox.put((methnumber, ret)) 00021 continue 00022 return 00023 class AsyncMethod(object):