Author jan.cespivo
Recipients Dima.Tisnek, chris.jerdonek, emilyemorehouse, jan.cespivo, yselivanov
Date 2018-05-24.11:49:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1527162564.36.0.682650639539.issue30773@psf.upfronthosting.co.za>
In-reply-to
Content
I've reproduced the problem also in 3.7 branch.

```
import asyncio

loop = asyncio.get_event_loop()


async def consumer():
    while True:
        await asyncio.sleep(0)
        message = yield
        print('received', message)


async def amain():
    agenerator = consumer()
    await agenerator.asend(None)

    fa = asyncio.create_task(agenerator.asend('A'))
    fb = asyncio.create_task(agenerator.asend('B'))
    await fa
    await fb


loop.run_until_complete(amain())
```

Output:
```
received A
received None
```

If the line `await asyncio.sleep(0)` is omitted the output is ok:
```
received A
received B
```
History
Date User Action Args
2018-05-24 11:49:24jan.cespivosetrecipients: + jan.cespivo, chris.jerdonek, Dima.Tisnek, yselivanov, emilyemorehouse
2018-05-24 11:49:24jan.cespivosetmessageid: <1527162564.36.0.682650639539.issue30773@psf.upfronthosting.co.za>
2018-05-24 11:49:24jan.cespivolinkissue30773 messages
2018-05-24 11:49:24jan.cespivocreate