Author Dima.Tisnek
Recipients Dima.Tisnek, yselivanov
Date 2017-06-26.18:55:33
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za>
In-reply-to
Content
MRE

```
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)

    await asyncio.gather(*(user(f"user-{x}", g) for x in range(3)))


if __name__ == "__main__":
    asyncio.get_event_loop().run_until_complete(helper())
```

Produces output:

```
sending user-0
received user-0
sending user-1
sending user-2
received None
received None
```

Expected output (some variance allowed):

```
sending user-0
received user-0
sending user-1
sending user-2
received user-1
received user-2
```

Initial report / discussion: https://mail.python.org/pipermail/async-sig/2017-June/000293.html
History
Date User Action Args
2017-06-26 18:55:33Dima.Tisneksetrecipients: + Dima.Tisnek, yselivanov
2017-06-26 18:55:33Dima.Tisneksetmessageid: <1498503333.78.0.356156621032.issue30773@psf.upfronthosting.co.za>
2017-06-26 18:55:33Dima.Tisneklinkissue30773 messages
2017-06-26 18:55:33Dima.Tisnekcreate