def f(i): v = _async.call_from_main_thread_and_wait(m, 'foo') _async.call_from_main_thread(print, "v: %s" % v)
def cb(r): _async.call_from_main_thread(d.__setitem__, ('result', r*2))
def f(i): r = i * 2 s = "result: %d" % r _async.call_from_main_thread(print, s)
def decorator(*_args, **_kwds): _async.call_from_main_thread(f, _args, _kwds)
def cb(r): s = "result x 2 = %d" % (r * 2) _async.call_from_main_thread(print, s)
def cb(r): _async.call_from_main_thread(d.__setitem__, ('result', r * 2))