Skip to content

Commit 0376015

Browse files
committed
commit 3
1 parent 3759cbc commit 0376015

1 file changed

Lines changed: 7 additions & 6 deletions

File tree

Doc/library/asyncio-queue.rst

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ asyncio queues are designed to be similar to classes of the
1515
they are designed to be used specifically in async/await code.
1616

1717
Note that methods of asyncio queues don't have a *timeout* parameter;
18-
use :func:`asyncio.wait_for` function to perform queue operations with a
18+
use :func:`asyncio.wait_for` function to perform queue operations with
1919
timeouts.
2020

21-
See also the `Examples`_ section below.
21+
Also see the `Examples`_ section below.
2222

2323
Queue
2424
=====
@@ -80,7 +80,7 @@ Queue
8080
Block until all items in the queue have been received and processed.
8181

8282
The count of unfinished tasks goes up whenever an item is added
83-
to the queue. The count goes down whenever a consumer coroutine calls
83+
to the queue. The count goes down whenever a consumer calls
8484
:meth:`task_done` to indicate that the item was retrieved and all
8585
work on it is complete. When the count of unfinished tasks drops
8686
to zero, :meth:`join` unblocks.
@@ -118,8 +118,9 @@ Queue
118118
down normally with :meth:`~Queue.get` calls to extract tasks
119119
that have already been loaded.
120120

121-
And if :meth:`~Queue.task_done` is called for each remaining task, a
122-
pending :meth:`~Queue.join` will be unblocked normally.
121+
In this case, if :meth:`~Queue.task_done` is called for each
122+
remaining task, a pending :meth:`~Queue.join` will be unblocked
123+
normally.
123124

124125
Once the queue is empty, future calls to :meth:`~Queue.get` will
125126
raise :exc:`QueueShutDown`.
@@ -218,7 +219,7 @@ concurrent tasks::
218219
# Get a "work item" out of the queue.
219220
sleep_for = await queue.get()
220221

221-
# Sleep for the "sleep_for" seconds.
222+
# Sleep "sleep_for" seconds.
222223
await asyncio.sleep(sleep_for)
223224

224225
# Notify the queue that the "work item" has been processed.

0 commit comments

Comments
 (0)