Skip to content
This repository was archived by the owner on May 31, 2021. It is now read-only.

Commit db0a20f

Browse files
authored
Update comments in the producer/consumer example
1 parent 6e8a0d6 commit db0a20f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/producer_consumer_join.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@ async def consume(queue):
2929

3030
async def run(n):
3131
queue = asyncio.Queue()
32-
# register the consume coroutine
32+
# schedule the consumer
3333
consumer = asyncio.ensure_future(consume(queue))
34-
# launch the producer and wait for completion
34+
# run the producer and wait for completion
3535
await produce(queue, n)
36-
# ensure the consumer consumes all produced items
36+
# wait until the consumer has processed all items
3737
await queue.join()
38-
# consumer is always awaiting for a new item, cancel it
38+
# the consumer is still awaiting for an item, cancel it
3939
consumer.cancel()
4040

4141

0 commit comments

Comments
 (0)