Message386477
Thanks for the minimal reproducer. I've tested it on 3.9.0 and 3.10a4 and they seem to exhibit the same behavior too.
Out of genuine curiosity (I don't mean to question if this *is* a bug, it seems like a trap for users): why not place an ``await asyncio.sleep(0)`` after ``queue.put`` line to force a switch in the producer? Eg, from your example code, instead of :
while True:
await q.put(i)
maybe this:
while True:
await q.put(i)
await asyncio.sleep(0)
With that workaround, your example starts printing each item and the consumer tasks don't seem to get blocked. |
|
Date |
User |
Action |
Args |
2021-02-04 09:11:58 | kj | set | recipients:
+ kj, asvetlov, yselivanov, spenczar |
2021-02-04 09:11:58 | kj | set | messageid: <1612429918.79.0.204982706852.issue43119@roundup.psfhosted.org> |
2021-02-04 09:11:58 | kj | link | issue43119 messages |
2021-02-04 09:11:57 | kj | create | |
|