Esempio n. 1
0
 def func(fut):
     try:
         value = aiogevent.yield_future(fut, loop=loop2)
     except Exception as exc:
         result.append(str(exc))
     else:
         result.append(value)
     self.loop.stop()
Esempio n. 2
0
 def func(fut):
     try:
         value = aiogevent.yield_future(fut)
     except Exception:
         result.append('error')
     else:
         result.append(value)
     self.loop.stop()
Esempio n. 3
0
def greenlet_yield_future(result, loop):
    try:
        value = aiogevent.yield_future(coro_slow_append(result, 1, 0.020))
        result.append(value)

        value = aiogevent.yield_future(coro_slow_append(result, 2, 0.010))
        result.append(value)

        try:
            value = aiogevent.yield_future(coro_slow_error())
        except ValueError as exc:
            result.append(str(exc))

        result.append(4)
        return result
    except Exception as exc:
        result.append(repr(exc))
    finally:
        loop.stop()
Esempio n. 4
0
 def func(obj):
     return aiogevent.yield_future(obj)
Esempio n. 5
0
 def func(event, fut):
     event.set()
     value = aiogevent.yield_future(fut)
     result.append(value)
     self.loop.stop()
Esempio n. 6
0
 def func(fut):
     value = aiogevent.yield_future(coro_slow_append(result, 3))
     result.append(value)
     self.loop.stop()