File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -344,6 +344,19 @@ msgstr ""
344
344
"像是分配記憶體失敗)。可選的 args *block* 和 *timeout* 會被忽略,它們僅是為了"
345
345
"與 :meth:`Queue.put` 相容才存在。"
346
346
347
+ #: ../../library/queue.rst:243
348
+ msgid ""
349
+ "This method has a C implementation which is reentrant. That is, a ``put()`` "
350
+ "or ``get()`` call can be interrupted by another ``put()`` call in the same "
351
+ "thread without deadlocking or corrupting internal state inside the queue. "
352
+ "This makes it appropriate for use in destructors such as ``__del__`` methods "
353
+ "or :mod:`weakref` callbacks."
354
+ msgstr ""
355
+ "此 method 有一個可重入 (reentrant) 的 C 實作。意思就是,一個 ``put()`` 或 "
356
+ "``get()`` 呼叫,可以被同一執行緒中的另一個 ``put()`` 呼叫中斷,而不會造成死"
357
+ "鎖 (deadlock) 或損壞佇列中的內部狀態。這使得它適合在解構子 (destructor) 中使"
358
+ "用,像是 ``__del__`` method 或 :mod:`weakref` 回呼函式 (callback)。"
359
+
347
360
#: ../../library/queue.rst:252
348
361
msgid ""
349
362
"Equivalent to ``put(item, block=False)``, provided for compatibility with :"
You can’t perform that action at this time.
0 commit comments