Пример #1
0
    def f1():
        with yielding(2) as y:
            for c in chars:
                y.spawn(f(c))

            yield from y
Пример #2
0
 def gen_func():
     with yielding(3) as y:
         for c in 'abcdefghijklmn':
             y.spawn(g(c))
         yield from y
Пример #3
0
 def gen_func():
     with yielding() as y:
         for c in chars:
             y.spawn(f(c))
         yield from y
Пример #4
0
 def gen_func():
     with yielding() as y:
         y.spawn(asyncio.sleep(0.01))
         yield from y