@@ -472,25 +472,30 @@ msgid ""
472472"``True`` or ``False``. If ``None`` (the default), this flag will be "
473473"inherited from the creating process."
474474msgstr ""
475+ "应始终使用关键字参数调用构造函数。 *group* 应该始终是 ``None`` ;它仅用于兼容 :class:`threading.Thread` 。"
476+ " *target* 是由 :meth:`run()` 方法调用的可调用对象。它默认为 ``None`` ,意味着什么都没有被调用。 *name* "
477+ "是进程名称(有关详细信息,请参阅 :attr:`name` )。 *args* 是目标调用的参数元组。 *kwargs* "
478+ "是目标调用的关键字参数字典。如果提供,则键参数 *daemon* 将进程 :attr:`daemon` 标志设置为 ``True`` 或 "
479+ "``False`` 。如果是 ``None`` (默认值),则该标志将从创建的进程继承。"
475480
476481#: ../../library/multiprocessing.rst:476
477482msgid "By default, no arguments are passed to *target*."
478- msgstr ""
483+ msgstr "默认情况下,不会将任何参数传递给 *target* 。 "
479484
480485#: ../../library/multiprocessing.rst:478
481486msgid ""
482487"If a subclass overrides the constructor, it must make sure it invokes the "
483488"base class constructor (:meth:`Process.__init__`) before doing anything else"
484489" to the process."
485- msgstr ""
490+ msgstr "如果子类重写构造函数,它必须确保它在对进程执行任何其他操作之前调用基类构造函数( :meth:`Process.__init__` )。 "
486491
487492#: ../../library/multiprocessing.rst:482
488493msgid "Added the *daemon* argument."
489494msgstr "加入 *daemon* 参数。"
490495
491496#: ../../library/multiprocessing.rst:487
492497msgid "Method representing the process's activity."
493- msgstr ""
498+ msgstr "表示进程活动的方法。 "
494499
495500#: ../../library/multiprocessing.rst:489
496501msgid ""
@@ -499,16 +504,18 @@ msgid ""
499504"target argument, if any, with sequential and keyword arguments taken from "
500505"the *args* and *kwargs* arguments, respectively."
501506msgstr ""
507+ "你可以在子类中重载此方法。标准 :meth:`run` 方法调用传递给对象构造函数的可调用对象作为目标参数(如果有),分别从 *args* 和 "
508+ "*kwargs* 参数中获取顺序和关键字参数。"
502509
503510#: ../../library/multiprocessing.rst:496
504511msgid "Start the process's activity."
505- msgstr ""
512+ msgstr "启动进程活动。 "
506513
507514#: ../../library/multiprocessing.rst:498
508515msgid ""
509516"This must be called at most once per process object. It arranges for the "
510517"object's :meth:`run` method to be invoked in a separate process."
511- msgstr ""
518+ msgstr "每个进程对象最多只能调用一次。它安排对象的 :meth:`run` 方法在一个单独的进程中调用。 "
512519
513520#: ../../library/multiprocessing.rst:503
514521msgid ""
@@ -519,22 +526,25 @@ msgid ""
519526"times out. Check the process's :attr:`exitcode` to determine if it "
520527"terminated."
521528msgstr ""
529+ "如果可选参数 *timeout* 是 ``None`` (默认值),则该方法将阻塞,直到调用 :meth:`join` 方法的进程终止。如果 "
530+ "*timeout* 是一个正数,它最多会阻塞 *timeout* 秒。请注意,如果进程终止或方法超时,则该方法返回 ``None`` 。检查进程的 "
531+ ":attr:`exitcode` 以确定它是否终止。"
522532
523533#: ../../library/multiprocessing.rst:510
524534msgid "A process can be joined many times."
525- msgstr ""
535+ msgstr "一个进程可以合并多次。 "
526536
527537#: ../../library/multiprocessing.rst:512
528538msgid ""
529539"A process cannot join itself because this would cause a deadlock. It is an "
530540"error to attempt to join a process before it has been started."
531- msgstr ""
541+ msgstr "进程无法并入自身,因为这会导致死锁。尝试在启动进程之前合并进程是错误的。 "
532542
533543#: ../../library/multiprocessing.rst:517
534544msgid ""
535545"The process's name. The name is a string used for identification purposes "
536546"only. It has no semantics. Multiple processes may be given the same name."
537- msgstr ""
547+ msgstr "进程的名称。该名称是一个字符串,仅用于识别目的。它没有语义。可以为多个进程指定相同的名称。 "
538548
539549#: ../../library/multiprocessing.rst:521
540550msgid ""
@@ -543,32 +553,34 @@ msgid ""
543553":sub:`2`:...:N\\ :sub:`k`' is constructed, where each N\\ :sub:`k` is the "
544554"N-th child of its parent."
545555msgstr ""
556+ "初始名称由构造函数设置。如果没有为构造函数提供显式名称,则构造形式为 'Process-N\\ :sub:`1`:N\\ "
557+ ":sub:`2`:...:N\\ :sub:`k`' 的名称,其中每个 N\\ :sub:`k`是其父亲的第N个孩子。"
546558
547559#: ../../library/multiprocessing.rst:528
548560msgid "Return whether the process is alive."
549- msgstr ""
561+ msgstr "返回进程是否还活着。 "
550562
551563#: ../../library/multiprocessing.rst:530
552564msgid ""
553565"Roughly, a process object is alive from the moment the :meth:`start` method "
554566"returns until the child process terminates."
555- msgstr ""
567+ msgstr "粗略地说,从 :meth:`start` 方法返回到子进程终止之前,进程对象仍处于活动状态。 "
556568
557569#: ../../library/multiprocessing.rst:535
558570msgid ""
559571"The process's daemon flag, a Boolean value. This must be set before "
560572":meth:`start` is called."
561- msgstr ""
573+ msgstr "进程的守护标志,一个布尔值。这必须在 :meth:`start` 被调用之前设置。 "
562574
563575#: ../../library/multiprocessing.rst:538
564576msgid "The initial value is inherited from the creating process."
565- msgstr ""
577+ msgstr "初始值继承自创建进程。 "
566578
567579#: ../../library/multiprocessing.rst:540
568580msgid ""
569581"When a process exits, it attempts to terminate all of its daemonic child "
570582"processes."
571- msgstr ""
583+ msgstr "当进程退出时,它会尝试终止其所有守护进程子进程。 "
572584
573585#: ../../library/multiprocessing.rst:543
574586msgid ""
@@ -578,59 +590,65 @@ msgid ""
578590"Unix daemons or services, they are normal processes that will be terminated "
579591"(and not joined) if non-daemonic processes have exited."
580592msgstr ""
593+ "请注意,不允许守护进程创建子进程。否则,守护进程会在子进程退出时终止其子进程。 另外,这些 **不是** "
594+ "Unix守护进程或服务,它们是正常进程,如果非守护进程已经退出,它们将被终止(并且不被合并)。"
581595
582596#: ../../library/multiprocessing.rst:549
583597msgid ""
584598"In addition to the :class:`threading.Thread` API, :class:`Process` objects "
585599"also support the following attributes and methods:"
586- msgstr ""
600+ msgstr "除了 :class:`threading.Thread` API ,:class:`Process` 对象还支持以下属性和方法: "
587601
588602#: ../../library/multiprocessing.rst:554
589603msgid ""
590604"Return the process ID. Before the process is spawned, this will be "
591605"``None``."
592- msgstr ""
606+ msgstr "返回进程ID。在生成该进程之前,这将是 ``None`` 。 "
593607
594608#: ../../library/multiprocessing.rst:559
595609msgid ""
596610"The child's exit code. This will be ``None`` if the process has not yet "
597611"terminated. A negative value *-N* indicates that the child was terminated "
598612"by signal *N*."
599- msgstr ""
613+ msgstr "的退子进程出代码。如果进程尚未终止,这将是 ``None`` 。负值 *-N* 表示孩子被信号 *N* 终止。 "
600614
601615#: ../../library/multiprocessing.rst:565
602616msgid "The process's authentication key (a byte string)."
603- msgstr ""
617+ msgstr "进程的身份验证密钥(字节字符串)。 "
604618
605619#: ../../library/multiprocessing.rst:567
606620msgid ""
607621"When :mod:`multiprocessing` is initialized the main process is assigned a "
608622"random string using :func:`os.urandom`."
609- msgstr ""
623+ msgstr "当 :mod:`multiprocessing` 初始化时,主进程使用 :func:`os.urandom` 分配一个随机字符串。 "
610624
611625#: ../../library/multiprocessing.rst:570
612626msgid ""
613627"When a :class:`Process` object is created, it will inherit the "
614628"authentication key of its parent process, although this may be changed by "
615629"setting :attr:`authkey` to another byte string."
616630msgstr ""
631+ "当创建 :class:`Process` 对象时,它将继承其父进程的身份验证密钥,尽管可以通过将 :attr:`authkey` "
632+ "设置为另一个字节字符串来更改。"
617633
618634#: ../../library/multiprocessing.rst:574
619635msgid "See :ref:`multiprocessing-auth-keys`."
620- msgstr ""
636+ msgstr "参见 :ref:`multiprocessing-auth-keys` 。 "
621637
622638#: ../../library/multiprocessing.rst:578
623639msgid ""
624640"A numeric handle of a system object which will become \" ready\" when the "
625641"process ends."
626- msgstr ""
642+ msgstr "系统对象的数字句柄,当进程结束时将变为 \" ready \" 。 "
627643
628644#: ../../library/multiprocessing.rst:581
629645msgid ""
630646"You can use this value if you want to wait on several events at once using "
631647":func:`multiprocessing.connection.wait`. Otherwise calling :meth:`join()` "
632648"is simpler."
633649msgstr ""
650+ "如果要使用 :func:`multiprocessing.connection.wait` 一次等待多个事件,可以使用此值。否则调用 "
651+ ":meth:`join()` 更简单。"
634652
635653#: ../../library/multiprocessing.rst:585
636654msgid ""
0 commit comments