88msgstr ""
99"Project-Id-Version : Python 3.7\n "
1010"Report-Msgid-Bugs-To : \n "
11- "POT-Creation-Date : 2018-06-30 05:56 +0900\n "
11+ "POT-Creation-Date : 2018-10-17 09:30 +0900\n "
1212"PO-Revision-Date : YEAR-MO-DA HO:MI+ZONE\n "
1313"
Last-Translator :
cissoid <[email protected] >, 2018\n "
1414"Language-Team : Chinese (China) (https://www.transifex.com/python-doc/teams/5390/zh_CN/)\n "
@@ -112,16 +112,14 @@ msgid ""
112112"system memory page size - platform documentation should be referred to for "
113113"more information (4 KiB pages are common; using multiples of 4096 for the "
114114"stack size is the suggested approach in the absence of more specific "
115- "information). Availability: Windows, systems with POSIX threads. "
115+ "information)."
116116msgstr ""
117- "返回创建线程时使用的线程堆栈大小。可选的 *size* 参数可以指定后续创建线程时是用的堆栈大小,但是必须传 0(使用平台或配置的默认值)或是大于等于 "
118- "32768 的正整数(32 KiB)。如果没有传 *size*,默认会使用 0。如果不支持修改线程堆栈大小的话,会抛出 "
119- ":exc:`RuntimeError` 异常。如果传入的堆栈大小不合法,会抛出 :exc:`ValueError` 异常,同时堆栈大小会保持不变。目前 "
120- "32 KiB 是保证解释器本身足够使用的最小堆栈大小。注意某些平台可能会对堆栈大小有特别的限制,比如需要最小堆栈大小 > 32 KiB "
121- "或是需要申请系统内存页整数倍大小的内存 —— 平台文档中应该可以找到更多相关信息(4 KiB 比较常见,在没有更多信息时使用 4096 "
122- "的整倍数作为堆栈大小是个不错的选择。可以用于:Windows,使用 POSIX 线程的系统。"
123117
124- #: ../../library/_thread.rst:109
118+ #: ../../library/_thread.rst:105
119+ msgid "Availability: Windows, systems with POSIX threads."
120+ msgstr ""
121+
122+ #: ../../library/_thread.rst:110
125123msgid ""
126124"The maximum value allowed for the *timeout* parameter of "
127125":meth:`Lock.acquire`. Specifying a timeout greater than this value will "
@@ -130,19 +128,19 @@ msgstr ""
130128":meth:`Lock.acquire` 方法中 *timeout* 参数允许的最大值。传入超过这个值的 timeout 会抛出 "
131129":exc:`OverflowError` 异常。"
132130
133- #: ../../library/_thread.rst:116
131+ #: ../../library/_thread.rst:117
134132msgid "Lock objects have the following methods:"
135133msgstr "锁对象有以下方法:"
136134
137- #: ../../library/_thread.rst:121
135+ #: ../../library/_thread.rst:122
138136msgid ""
139137"Without any optional argument, this method acquires the lock "
140138"unconditionally, if necessary waiting until it is released by another thread"
141139" (only one thread at a time can acquire a lock --- that's their reason for "
142140"existence)."
143141msgstr "没有任何可选参数时,该方法无条件申请获得锁,有必要的话会等待其他线程释放锁(同时只有一个线程能获得锁 —— 这正是锁存在的原因)。"
144142
145- #: ../../library/_thread.rst:125
143+ #: ../../library/_thread.rst:126
146144msgid ""
147145"If the integer *waitflag* argument is present, the action depends on its "
148146"value: if it is zero, the lock is only acquired if it can be acquired "
@@ -152,7 +150,7 @@ msgstr ""
152150"如果传入了整型参数 *waitflag*,具体的行为取决于传入的值:如果是 0 "
153151"的话,只会在能够立刻获取到锁时才获取,不会等待,如果是非零的话,会像之前提到的一样,无条件获取锁。"
154152
155- #: ../../library/_thread.rst:130
153+ #: ../../library/_thread.rst:131
156154msgid ""
157155"If the floating-point *timeout* argument is present and positive, it "
158156"specifies the maximum wait time in seconds before returning. A negative "
@@ -162,43 +160,43 @@ msgstr ""
162160"如果传入正浮点数参数 *timeout*,相当于指定了返回之前等待得最大秒数。如果传入负的 *timeout*,相当于无限期等待。如果 "
163161"*waitflag* 是 0 的话,不能指定 *timeout*。"
164162
165- #: ../../library/_thread.rst:135
163+ #: ../../library/_thread.rst:136
166164msgid ""
167165"The return value is ``True`` if the lock is acquired successfully, ``False``"
168166" if not."
169167msgstr "如果成功获取到所会返回 ``True``,否则返回 ``False``。"
170168
171- #: ../../library/_thread.rst:138
169+ #: ../../library/_thread.rst:139
172170msgid "The *timeout* parameter is new."
173171msgstr "新的 *timeout` 参数。"
174172
175- #: ../../library/_thread.rst:141
173+ #: ../../library/_thread.rst:142
176174msgid "Lock acquires can now be interrupted by signals on POSIX."
177175msgstr "现在获取锁的操作可以被 POSIX 信号中断。"
178176
179- #: ../../library/_thread.rst:147
177+ #: ../../library/_thread.rst:148
180178msgid ""
181179"Releases the lock. The lock must have been acquired earlier, but not "
182180"necessarily by the same thread."
183181msgstr "释放锁。锁必须已经被获取过,但不一定是同一个线程获取的。"
184182
185- #: ../../library/_thread.rst:153
183+ #: ../../library/_thread.rst:154
186184msgid ""
187185"Return the status of the lock: ``True`` if it has been acquired by some "
188186"thread, ``False`` if not."
189187msgstr "返回锁的状态:如果已被某个线程获取,返回 ``True``,否则返回 ``False``。"
190188
191- #: ../../library/_thread.rst:156
189+ #: ../../library/_thread.rst:157
192190msgid ""
193191"In addition to these methods, lock objects can also be used via the "
194192":keyword:`with` statement, e.g.::"
195193msgstr "除了这些方法之外,锁对象也可以通过 :keyword:`with` 语句使用,例如:"
196194
197- #: ../../library/_thread.rst:166
195+ #: ../../library/_thread.rst:167
198196msgid "**Caveats:**"
199197msgstr "**注意事项:**"
200198
201- #: ../../library/_thread.rst:170
199+ #: ../../library/_thread.rst:171
202200msgid ""
203201"Threads interact strangely with interrupts: the :exc:`KeyboardInterrupt` "
204202"exception will be received by an arbitrary thread. (When the :mod:`signal` "
@@ -207,21 +205,21 @@ msgstr ""
207205"线程与中断奇怪地交互::exc:`KeyboardInterrupt` 异常可能会被任意一个线程捕获。(如果 :mod:`signal` "
208206"模块可用的话,中断总是会进入主线程。)"
209207
210- #: ../../library/_thread.rst:174
208+ #: ../../library/_thread.rst:175
211209msgid ""
212210"Calling :func:`sys.exit` or raising the :exc:`SystemExit` exception is "
213211"equivalent to calling :func:`_thread.exit`."
214212msgstr ""
215213"调用 :func:`sys.exit` 或是抛出 :exc:`SystemExit` 异常等效于调用 :func:`_thread.exit`。"
216214
217- #: ../../library/_thread.rst:177
215+ #: ../../library/_thread.rst:178
218216msgid ""
219217"It is not possible to interrupt the :meth:`acquire` method on a lock --- the"
220218" :exc:`KeyboardInterrupt` exception will happen after the lock has been "
221219"acquired."
222220msgstr "不可能中断锁的 :meth:`acquire` 方法 —— :exc:`KeyboardInterrupt` 一场会在锁获取到之后发生。"
223221
224- #: ../../library/_thread.rst:180
222+ #: ../../library/_thread.rst:181
225223msgid ""
226224"When the main thread exits, it is system defined whether the other threads "
227225"survive. On most systems, they are killed without executing :keyword:`try` "
@@ -230,7 +228,7 @@ msgstr ""
230228"当主线程退出时,由系统决定其他线程是否存活。在大多数系统中,这些线程会直接被杀掉,不会执行 :keyword:`try` ... "
231229":keyword:`finally` 语句,也不会执行对象析构函数。"
232230
233- #: ../../library/_thread.rst:185
231+ #: ../../library/_thread.rst:186
234232msgid ""
235233"When the main thread exits, it does not do any of its usual cleanup (except "
236234"that :keyword:`try` ... :keyword:`finally` clauses are honored), and the "
0 commit comments