This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dima.Tisnek
Recipients Dima.Tisnek, yselivanov
Date 2017-06-26.19:03:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
@Yuri, this bug doesn't require `gather`, here's a version with futures and explicit await's instead. It produces same output:

import asyncio

async def generator():
    while True:
        x = yield 42
        print("received", x)
        await asyncio.sleep(0.1)

async def user(name, g):
    print("sending", name)
    await g.asend(name)

async def helper():
    g = generator()
    await g.asend(None)

    u0 = asyncio.ensure_future(user("user-0", g))
    u1 = asyncio.ensure_future(user("user-1", g))
    u2 = asyncio.ensure_future(user("user-2", g))

    await u0
    await u1
    await u2

if __name__ == "__main__":

Same with `asyncio.get_event_loop().create_task` as well.
Date User Action Args
2017-06-26 19:03:36Dima.Tisneksetrecipients: + Dima.Tisnek, yselivanov
2017-06-26 19:03:36Dima.Tisneksetmessageid: <>
2017-06-26 19:03:36Dima.Tisneklinkissue30773 messages
2017-06-26 19:03:36Dima.Tisnekcreate