Skip to content

Commit 3b359ff

Browse files
authored
commit 3
1 parent 02a6c0f commit 3b359ff

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
=====
@@ -78,7 +78,7 @@ Queue
7878
Block until all items in the queue have been received and processed.
7979

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

117-
And if :meth:`~Queue.task_done` is called for each remaining task, a
118-
pending :meth:`~Queue.join` will be unblocked normally.
117+
In this case, if :meth:`~Queue.task_done` is called for each
118+
remaining task, a pending :meth:`~Queue.join` will be unblocked
119+
normally.
119120

120121
Once the queue is empty, future calls to :meth:`~Queue.get` will
121122
raise :exc:`QueueShutDown`.
@@ -213,7 +214,7 @@ concurrent tasks::
213214
# Get a "work item" out of the queue.
214215
sleep_for = await queue.get()
215216

216-
# Sleep for the "sleep_for" seconds.
217+
# Sleep "sleep_for" seconds.
217218
await asyncio.sleep(sleep_for)
218219

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

0 commit comments

Comments
 (0)