@@ -15,7 +15,7 @@ module implements all the required locking semantics.
15
15
16
16
The module implements three types of queue, which differ only in the order in
17
17
which the entries are retrieved. In a :abbr: `FIFO ( first-in, first-out ) `
18
- queue, the first tasks added are the first retrieved. In a
18
+ queue, the first tasks added are the first retrieved. In a
19
19
:abbr: `LIFO ( last-in, first-out ) ` queue, the most recently added entry is
20
20
the first retrieved (operating like a stack). With a priority queue,
21
21
the entries are kept sorted (using the :mod: `heapq ` module) and the
@@ -57,7 +57,7 @@ The :mod:`queue` module defines the following classes and exceptions:
57
57
*maxsize * is less than or equal to zero, the queue size is infinite.
58
58
59
59
The lowest valued entries are retrieved first (the lowest valued entry is the
60
- one that would be returned by ``min(entries) ``). A typical pattern for
60
+ one that would be returned by ``min(entries) ``). A typical pattern for
61
61
entries is a tuple in the form: ``(priority_number, data) ``.
62
62
63
63
If the *data * elements are not comparable, the data can be wrapped in a class
@@ -127,8 +127,8 @@ provide the public methods described below.
127
127
128
128
.. method :: Queue.put(item, block=True, timeout=None)
129
129
130
- Put *item * into the queue. If optional args *block * is true and *timeout * is
131
- ``None `` (the default), block if necessary until a free slot is available. If
130
+ Put *item * into the queue. If optional args *block * is true and *timeout * is
131
+ ``None `` (the default), block if necessary until a free slot is available. If
132
132
*timeout * is a positive number, it blocks at most *timeout * seconds and raises
133
133
the :exc: `Full ` exception if no free slot was available within that time.
134
134
Otherwise (*block * is false), put an item on the queue if a free slot is
@@ -143,7 +143,7 @@ provide the public methods described below.
143
143
144
144
.. method :: Queue.get(block=True, timeout=None)
145
145
146
- Remove and return an item from the queue. If optional args *block * is true and
146
+ Remove and return an item from the queue. If optional args *block * is true and
147
147
*timeout * is ``None `` (the default), block if necessary until an item is available.
148
148
If *timeout * is a positive number, it blocks at most *timeout * seconds and
149
149
raises the :exc: `Empty ` exception if no item was available within that time.
@@ -152,7 +152,7 @@ provide the public methods described below.
152
152
153
153
Prior to 3.0 on POSIX systems, and for all versions on Windows, if
154
154
*block * is true and *timeout * is ``None ``, this operation goes into
155
- an uninterruptible wait on an underlying lock. This means that no exceptions
155
+ an uninterruptible wait on an underlying lock. This means that no exceptions
156
156
can occur, and in particular a SIGINT will not trigger a :exc: `KeyboardInterrupt `.
157
157
158
158
@@ -184,7 +184,7 @@ fully processed by daemon consumer threads.
184
184
185
185
The count of unfinished tasks goes up whenever an item is added to the queue.
186
186
The count goes down whenever a consumer thread calls :meth: `task_done ` to
187
- indicate that the item was retrieved and all work on it is complete. When the
187
+ indicate that the item was retrieved and all work on it is complete. When the
188
188
count of unfinished tasks drops to zero, :meth: `join ` unblocks.
189
189
190
190
@@ -227,7 +227,7 @@ SimpleQueue Objects
227
227
228
228
.. method :: SimpleQueue.empty()
229
229
230
- Return ``True `` if the queue is empty, ``False `` otherwise. If empty()
230
+ Return ``True `` if the queue is empty, ``False `` otherwise. If empty()
231
231
returns ``False `` it doesn't guarantee that a subsequent call to get()
232
232
will not block.
233
233
0 commit comments