1313# Pandaaaa906 <[email protected] >, 20191414# Meng Du <[email protected] >, 20191515# Liying Yang <[email protected] >, 201916- # weditor <[email protected] >, 20191716# Freesand Leo <[email protected] >, 201917+ # weditor <[email protected] >, 20191818#
1919#, fuzzy
2020msgid ""
@@ -23,7 +23,7 @@ msgstr ""
2323"Report-Msgid-Bugs-To : \n "
2424"POT-Creation-Date : 2019-09-01 14:24+0000\n "
2525"PO-Revision-Date : 2017-02-16 23:19+0000\n "
26- "Last-Translator : Freesand Leo <yuqinju @163.com>, 2019\n "
26+ "Last-Translator : weditor <weditor @163.com>, 2019\n "
2727"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
2828"MIME-Version : 1.0\n "
2929"Content-Type : text/plain; charset=UTF-8\n "
@@ -1655,6 +1655,8 @@ msgid ""
16551655"thread may acquire it again without blocking; that process or thread must "
16561656"release it once for each time it has been acquired."
16571657msgstr ""
1658+ "递归锁对象: 类似于 :class:`threading.RLock` "
1659+ "。递归锁必须由持有线程、进程亲自释放。如果某个进程或者线程拿到了递归锁,这个进程或者线程可以再次拿到这个锁而不需要等待。但是这个进程或者线程的拿锁操作和释放锁操作的次数必须相同。"
16581660
16591661#: ../../library/multiprocessing.rst:1302
16601662msgid ""
@@ -1698,13 +1700,18 @@ msgid ""
16981700"thread takes ownership and the recursion level is incremented, resulting in "
16991701"a return value of ``True``."
17001702msgstr ""
1703+ "当 *block* 参数是 ``False`` , "
1704+ "将不会阻塞,如果此时锁被其他进程或者线程持有,当前进程、线程获取锁操作失败,锁的递归等级也不会改变,函数返回 ``False`` , "
1705+ "如果当前锁已经处于释放状态,则当前进程、线程则会拿到锁,并且锁内的递归等级加一,函数返回 ``True`` 。"
17011706
17021707#: ../../library/multiprocessing.rst:1332
17031708msgid ""
17041709"Use and behaviors of the *timeout* argument are the same as in "
17051710":meth:`Lock.acquire`. Note that some of these behaviors of *timeout* differ"
17061711" from the implemented behaviors in :meth:`threading.RLock.acquire`."
17071712msgstr ""
1713+ "*timeout* 参数的使用方法及行为与 :meth:`Lock.acquire` 一样。但是要注意 *timeout* 的其中一些行为和 "
1714+ ":meth:`threading.RLock.acquire` 中实现的行为是不同的。"
17081715
17091716#: ../../library/multiprocessing.rst:1339
17101717msgid ""
@@ -1715,6 +1722,7 @@ msgid ""
17151722"after the decrement the recursion level is still nonzero, the lock remains "
17161723"locked and owned by the calling process or thread."
17171724msgstr ""
1725+ "释放锁,使锁内的递归等级减一。如果释放后锁内的递归等级降低为0,则会重置锁的状态为释放状态(即没有被任何进程、线程持有),重置后如果有有其他进程和线程在等待这把锁,他们中的一个会获得这个锁而继续运行。如果释放后锁内的递归等级还没到达0,则这个锁仍将保持未释放状态且当前进程和线程仍然是持有者。"
17181726
17191727#: ../../library/multiprocessing.rst:1347
17201728msgid ""
@@ -1724,16 +1732,21 @@ msgid ""
17241732"state. Note that the type of exception raised in this situation differs "
17251733"from the implemented behavior in :meth:`threading.RLock.release`."
17261734msgstr ""
1735+ "只有当前进程或线程是锁的持有者时,才允许调用这个方法。如果当前进程或线程不是这个锁的拥有者,或者这个锁处于已释放的状态(即没有任何拥有者),调用这个方法会抛出"
1736+ " :exc:`AssertionError` 异常。注意这里抛出的异常类型和 :meth:`threading.RLock.release` "
1737+ "中实现的行为不一样。"
17271738
17281739#: ../../library/multiprocessing.rst:1356
17291740msgid "A semaphore object: a close analog of :class:`threading.Semaphore`."
1730- msgstr ""
1741+ msgstr "一种信号量对象: 类似于 :class:`threading.Semaphore`. "
17311742
17321743#: ../../library/multiprocessing.rst:1363
17331744msgid ""
17341745"On Mac OS X, ``sem_timedwait`` is unsupported, so calling ``acquire()`` with"
17351746" a timeout will emulate that function's behavior using a sleeping loop."
17361747msgstr ""
1748+ "在 Mac OS X 上,不支持 ``sem_timedwait`` ,所以,使用调用 ``acquire()`` 时如果使用 timeout "
1749+ "参数,会通过循环sleep来模拟这个函数的行为。 "
17371750
17381751#: ../../library/multiprocessing.rst:1368
17391752msgid ""
0 commit comments