@@ -2862,17 +2862,17 @@ msgstr "返回执行状态,是否已经完成。"
28622862msgid ""
28632863"Return whether the call completed without raising an exception. Will raise "
28642864":exc:`AssertionError` if the result is not ready."
2865- msgstr ""
2865+ msgstr "判断调用是否已经完成并且无异常,如果没有执行完成会抛出 :exc:`AssertionError` 异常。 "
28662866
28672867#: ../../library/multiprocessing.rst:2283
28682868msgid ""
28692869"If the result is not ready, :exc:`ValueError` is raised instead of "
28702870":exc:`AssertionError`."
2871- msgstr ""
2871+ msgstr "如果没有执行完,会抛出 :exc:`ValueError` 异常而不是 :exc:`AssertionError` 。 "
28722872
28732873#: ../../library/multiprocessing.rst:2287
28742874msgid "The following example demonstrates the use of a pool::"
2875- msgstr ""
2875+ msgstr "下面的例子演示了进程池的用法:: "
28762876
28772877#: ../../library/multiprocessing.rst:2314
28782878msgid "Listeners and Clients"
@@ -3493,13 +3493,18 @@ msgid ""
34933493"same data being flushed to the object multiple times, resulting in "
34943494"corruption."
34953495msgstr ""
3496+ "它解决了进程相互冲突导致文件描述符错误的根本问题,但是对使用带缓冲的“文件类对象”替换 :func:`sys.stdin` "
3497+ "作为输出的应用程序造成了潜在的危险。如果多个进程调用了此文件类对象的 :meth:`~io.IOBase.close()` "
3498+ "方法,会导致相同的数据多次刷写到此对象,损坏数据。"
34963499
34973500#: ../../library/multiprocessing.rst:2794
34983501msgid ""
34993502"If you write a file-like object and implement your own caching, you can make"
35003503" it fork-safe by storing the pid whenever you append to the cache, and "
35013504"discarding the cache when the pid changes. For example::"
35023505msgstr ""
3506+ "如果你写入文件类对象并实现了自己的缓存,可以在每次追加缓存数据时记录当前进程id,从而将其变成 fork "
3507+ "安全的,当发现进程id变化后舍弃之前的缓存,例如::"
35033508
35043509#: ../../library/multiprocessing.rst:2806
35053510msgid ""
0 commit comments