def capybara(): val1 = 0 try: val1 += yield async_fn.asynq(1) except OverflowError: val1 += yield async_fn.asynq(4) result(val1)
def capybara(oid): second_oid = yield cached_fn.asynq(oid) new_oid = yield async_fn.asynq(second_oid) def process(): return new_oid - 2 result(process())
def capybara(qids, t): @asynq() def filter_fn(qid): result( (yield PropertyObject(qid).get_prop_with_get.asynq()) < t) qids = yield afilter.asynq(filter_fn, qids) system_a2a_ret = yield tuple(async_fn.asynq(qid) for qid in qids) result(system_a2a_ret)
def capybara(oid): yield async_fn.asynq(oid), async_fn.asynq(oid)
def f(): x = 0 x += yield async_fn.asynq(1) yield async_fn.asynq(x)
def f(): yield async_fn.asynq(1) yield async_fn.asynq(2) # some other code val1 = 1 result(val1)
def dupe_call(oid): yield async_fn.asynq(oid), async_fn.asynq( oid) # E: duplicate_yield
def tree(self): yield async_fn.asynq(self.qid) result([])