/search.css" rel="stylesheet" type="text/css"/> /search.js">
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.
00007 : 00008 ''' 00009 00010 Accept messages, convert to method calls on given object, pass 00011 return value as message. 00012 00013 ''' 00014 while True: 00015 msg = inbox.get(block=True) 00016 methname, methnumber, args, kwds = msg 00017 if methname == 'async_caller_exit': 00018 break 00019 meth = eval("obj.%s"%methname) 00020 ret = meth(*args, **kwds) 00021 outbox.put((methnumber, ret)) 00022 continue 00023 return