Exemple #1
0
 def capybara():
     val1 = 0
     try:
         val1 += yield async_fn.asynq(1)
     except OverflowError:
         val1 += yield async_fn.asynq(4)
     result(val1)
Exemple #2
0
        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())
Exemple #3
0
        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)
Exemple #4
0
 def capybara(oid):
     yield async_fn.asynq(oid), async_fn.asynq(oid)
Exemple #5
0
 def f():
     x = 0
     x += yield async_fn.asynq(1)
     yield async_fn.asynq(x)
Exemple #6
0
 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
Exemple #8
0
 def tree(self):
     yield async_fn.asynq(self.qid)
     result([])