@@ -40,6 +40,7 @@ msgid ""
4040"Note that methods of asyncio queues don't have a *timeout* parameter; use "
4141":func:`asyncio.wait_for` function to do queue operations with a timeout."
4242msgstr ""
43+ "注意asyncio 的队列没有 *timeout* 形参;请使用 :func:`asyncio.wait_for` 函数为队列添加超时操作。"
4344
4445#: ../../library/asyncio-queue.rst:17
4546msgid "See also the `Examples`_ section below."
@@ -51,20 +52,22 @@ msgstr "队列"
5152
5253#: ../../library/asyncio-queue.rst:24
5354msgid "A first in, first out (FIFO) queue."
54- msgstr ""
55+ msgstr "先进,先出(FIFO)队列 "
5556
5657#: ../../library/asyncio-queue.rst:26
5758msgid ""
5859"If *maxsize* is less than or equal to zero, the queue size is infinite. If "
5960"it is an integer greater than ``0``, then ``await put()`` blocks when the "
6061"queue reaches *maxsize* until an item is removed by :meth:`get`."
6162msgstr ""
63+ "如果 *maxsize* 小于等于零,则队列尺寸是无限的。如果是大于 ``0`` 的整数,则当队列达到 *maxsize* 时, ``await "
64+ "put()`` 将阻塞至某个元素被 :meth:`get` 取出。"
6265
6366#: ../../library/asyncio-queue.rst:31
6467msgid ""
6568"Unlike the standard library threading :mod:`queue`, the size of the queue is"
6669" always known and can be returned by calling the :meth:`qsize` method."
67- msgstr ""
70+ msgstr "不像标准库中的并发型 :mod:`queue` ,队列的尺寸一直是已知的,可以通过调用 :meth:`qsize` 方法返回。 "
6871
6972#: ../../library/asyncio-queue.rst:35
7073msgid "This class is :ref:`not thread safe <asyncio-multithreading>`."
@@ -86,7 +89,7 @@ msgstr ""
8689msgid ""
8790"If the queue was initialized with ``maxsize=0`` (the default), then "
8891":meth:`full()` never returns ``True``."
89- msgstr ""
92+ msgstr "如果队列用 ``maxsize=0`` (默认)初始化,则 :meth:`full()` 永远不会返回 ``True`` 。 "
9093
9194#: ../../library/asyncio-queue.rst:54
9295msgid ""
@@ -102,7 +105,7 @@ msgstr "立即返回一个队列中的元素,如果队列内有值,否则引
102105
103106#: ../../library/asyncio-queue.rst:64
104107msgid "Block until all items in the queue have been received and processed."
105- msgstr ""
108+ msgstr "阻塞至队列中所有的元素都被接收和处理完毕。 "
106109
107110#: ../../library/asyncio-queue.rst:66
108111msgid ""
@@ -117,7 +120,7 @@ msgstr ""
117120msgid ""
118121"Put an item into the queue. If the queue is full, wait until a free slot is "
119122"available before adding the item."
120- msgstr ""
123+ msgstr "添加一个元素进队列。如果队列满了,在添加元素之前,会一直等待空闲插槽可用。 "
121124
122125#: ../../library/asyncio-queue.rst:79
123126msgid "Put an item into the queue without blocking."
@@ -129,7 +132,7 @@ msgstr "如果没有立即可用的空闲槽,引发 :exc:`QueueFull` 异常。
129132
130133#: ../../library/asyncio-queue.rst:85
131134msgid "Return the number of items in the queue."
132- msgstr ""
135+ msgstr "返回队列用的元素数量。 "
133136
134137#: ../../library/asyncio-queue.rst:89
135138msgid "Indicate that a formerly enqueued task is complete."
@@ -159,7 +162,7 @@ msgstr ""
159162
160163#: ../../library/asyncio-queue.rst:105
161164msgid "Priority Queue"
162- msgstr ""
165+ msgstr "优先级队列 "
163166
164167#: ../../library/asyncio-queue.rst:109
165168msgid ""
@@ -169,11 +172,11 @@ msgstr ":class:`Queue` 的变体;按优先级顺序取出条目 (最小的先
169172
170173#: ../../library/asyncio-queue.rst:112
171174msgid "Entries are typically tuples of the form ``(priority_number, data)``."
172- msgstr ""
175+ msgstr "条目通常是 ``(priority_number, data)`` 形式的元组。 "
173176
174177#: ../../library/asyncio-queue.rst:117
175178msgid "LIFO Queue"
176- msgstr ""
179+ msgstr "后进先出队列 "
177180
178181#: ../../library/asyncio-queue.rst:121
179182msgid ""
@@ -189,13 +192,13 @@ msgstr "异常"
189192msgid ""
190193"This exception is raised when the :meth:`~Queue.get_nowait` method is called"
191194" on an empty queue."
192- msgstr ""
195+ msgstr "当队列为空的时候,调用 :meth:`~Queue.get_nowait` 方法而引发这个异常。 "
193196
194197#: ../../library/asyncio-queue.rst:136
195198msgid ""
196199"Exception raised when the :meth:`~Queue.put_nowait` method is called on a "
197200"queue that has reached its *maxsize*."
198- msgstr ""
201+ msgstr "当队列中条目数量已经达到它的 *maxsize* 的时候,调用 :meth:`~Queue.put_nowait` 方法而引发的异常。 "
199202
200203#: ../../library/asyncio-queue.rst:141
201204msgid "Examples"
@@ -204,4 +207,4 @@ msgstr "示例"
204207#: ../../library/asyncio-queue.rst:145
205208msgid ""
206209"Queues can be used to distribute workload between several concurrent tasks::"
207- msgstr ""
210+ msgstr "队列能被用于多个的并发任务的工作量分配: "
0 commit comments