- Notifications
You must be signed in to change notification settings - Fork 80
/
Copy pathasyncio-api-index.po
447 lines (347 loc) · 14.3 KB
/
asyncio-api-index.po
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2024, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Rafael Fontenelle <rffontenelle@gmail.com>, 2024
#
#,fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.12\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-06-14 18:58+0000\n"
"PO-Revision-Date: 2024-05-11 00:33+0000\n"
"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2024\n"
"Language-Team: Chinese (China) (https://app.transifex.com/python-doc/teams/5390/zh_CN/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: zh_CN\n"
"Plural-Forms: nplurals=1; plural=0;\n"
#:../../library/asyncio-api-index.rst:6
msgid"High-level API Index"
msgstr"高层级 API 索引"
#:../../library/asyncio-api-index.rst:8
msgid"This page lists all high-level async/await enabled asyncio APIs."
msgstr"这个页面列举了所有能用于 async/wait 的高层级asyncio API 集。"
#:../../library/asyncio-api-index.rst:12
msgid"Tasks"
msgstr"任务"
#:../../library/asyncio-api-index.rst:14
msgid""
"Utilities to run asyncio programs, create Tasks, and await on multiple "
"things with timeouts."
msgstr"运行异步程序,创建Task对象,等待多件事运行超时的公共集。"
#:../../library/asyncio-api-index.rst:21
msgid":func:`run`"
msgstr":func:`run`"
#:../../library/asyncio-api-index.rst:22
msgid"Create event loop, run a coroutine, close the loop."
msgstr"创建事件循环,运行一个协程,关闭事件循环。"
#:../../library/asyncio-api-index.rst:24
msgid":class:`Runner`"
msgstr":class:`Runner`"
#:../../library/asyncio-api-index.rst:25
msgid"A context manager that simplifies multiple async function calls."
msgstr"一个能够简化多次异步函数调用操作的上下文管理器。"
#:../../library/asyncio-api-index.rst:27
msgid":class:`Task`"
msgstr":class:`Task`"
#:../../library/asyncio-api-index.rst:28
msgid"Task object."
msgstr"Task对象"
#:../../library/asyncio-api-index.rst:30
msgid":class:`TaskGroup`"
msgstr":class:`TaskGroup`"
#:../../library/asyncio-api-index.rst:31
msgid""
"A context manager that holds a group of tasks. Provides a convenient and "
"reliable way to wait for all tasks in the group to finish."
msgstr"持有一组任务的上下文管理器。 它提供了一种等待分组中所有任务完成的方便可靠的方式。"
#:../../library/asyncio-api-index.rst:35
msgid":func:`create_task`"
msgstr":func:`create_task`"
#:../../library/asyncio-api-index.rst:36
msgid"Start an asyncio Task, then returns it."
msgstr"启动一个异步 Task,然后将其返回。"
#:../../library/asyncio-api-index.rst:38
msgid":func:`current_task`"
msgstr":func:`current_task`"
#:../../library/asyncio-api-index.rst:39
msgid"Return the current Task."
msgstr"返回当前Task对象"
#:../../library/asyncio-api-index.rst:41
msgid":func:`all_tasks`"
msgstr":func:`all_tasks`"
#:../../library/asyncio-api-index.rst:42
msgid"Return all tasks that are not yet finished for an event loop."
msgstr"返回一个事件循环的所有尚未完成的任务。"
#:../../library/asyncio-api-index.rst:44
msgid"``await`` :func:`sleep`"
msgstr"``await`` :func:`sleep`"
#:../../library/asyncio-api-index.rst:45
msgid"Sleep for a number of seconds."
msgstr"休眠几秒。"
#:../../library/asyncio-api-index.rst:47
msgid"``await`` :func:`gather`"
msgstr"``await`` :func:`gather`"
#:../../library/asyncio-api-index.rst:48
msgid"Schedule and wait for things concurrently."
msgstr"并发执行所有事件的调度和等待。"
#:../../library/asyncio-api-index.rst:50
msgid"``await`` :func:`wait_for`"
msgstr"``await`` :func:`wait_for`"
#:../../library/asyncio-api-index.rst:51
msgid"Run with a timeout."
msgstr"有超时控制的运行。"
#:../../library/asyncio-api-index.rst:53
msgid"``await`` :func:`shield`"
msgstr"``await`` :func:`shield`"
#:../../library/asyncio-api-index.rst:54
msgid"Shield from cancellation."
msgstr"屏蔽取消操作"
#:../../library/asyncio-api-index.rst:56
msgid"``await`` :func:`wait`"
msgstr"``await`` :func:`wait`"
#:../../library/asyncio-api-index.rst:57
msgid"Monitor for completion."
msgstr"完成情况的监控器"
#:../../library/asyncio-api-index.rst:59
msgid":func:`timeout`"
msgstr":func:`timeout`"
#:../../library/asyncio-api-index.rst:60
msgid"Run with a timeout. Useful in cases when ``wait_for`` is not suitable."
msgstr"设置超时运行。 在 ``wait_for`` 不适合的情况下会很有用。"
#:../../library/asyncio-api-index.rst:62
msgid":func:`to_thread`"
msgstr":func:`to_thread`"
#:../../library/asyncio-api-index.rst:63
msgid"Asynchronously run a function in a separate OS thread."
msgstr"在不同的 OS 线程中异步地运行一个函数。"
#:../../library/asyncio-api-index.rst:65
msgid":func:`run_coroutine_threadsafe`"
msgstr":func:`run_coroutine_threadsafe`"
#:../../library/asyncio-api-index.rst:66
msgid"Schedule a coroutine from another OS thread."
msgstr"从其他OS线程中调度一个协程。"
#:../../library/asyncio-api-index.rst:68
msgid"``for in`` :func:`as_completed`"
msgstr"``for in`` :func:`as_completed`"
#:../../library/asyncio-api-index.rst:69
msgid"Monitor for completion with a ``for`` loop."
msgstr"用 ``for`` 循环监控完成情况。"
#:../../library/asyncio-api-index.rst:73
#:../../library/asyncio-api-index.rst:109
#:../../library/asyncio-api-index.rst:133
#:../../library/asyncio-api-index.rst:169
#:../../library/asyncio-api-index.rst:205
#:../../library/asyncio-api-index.rst:230
msgid"Examples"
msgstr"例子"
#:../../library/asyncio-api-index.rst:74
msgid""
":ref:`Using asyncio.gather() to run things in parallel "
"<asyncio_example_gather>`."
msgstr":ref:`使用 asyncio.gather() 并行运行 <asyncio_example_gather>`."
#:../../library/asyncio-api-index.rst:77
msgid""
":ref:`Using asyncio.wait_for() to enforce a timeout "
"<asyncio_example_waitfor>`."
msgstr":ref:`使用 asyncio.wait_for() 强制超时 <asyncio_example_waitfor>`."
#:../../library/asyncio-api-index.rst:80
msgid":ref:`Cancellation <asyncio_example_task_cancel>`."
msgstr":ref:`撤销协程 <asyncio_example_task_cancel>`."
#:../../library/asyncio-api-index.rst:82
msgid":ref:`Using asyncio.sleep() <asyncio_example_sleep>`."
msgstr":ref:`asyncio.sleep() 的用法 <asyncio_example_sleep>`."
#:../../library/asyncio-api-index.rst:84
msgid"See also the main :ref:`Tasks documentation page <coroutine>`."
msgstr"请主要参阅 :ref:`协程与任务文档 <coroutine>`."
#:../../library/asyncio-api-index.rst:88
msgid"Queues"
msgstr"队列集"
#:../../library/asyncio-api-index.rst:90
msgid""
"Queues should be used to distribute work amongst multiple asyncio Tasks, "
"implement connection pools, and pub/sub patterns."
msgstr"队列集被用于多个异步Task对象的运行调度,实现连接池以及发布/订阅模式。"
#:../../library/asyncio-api-index.rst:98
msgid":class:`Queue`"
msgstr":class:`Queue`"
#:../../library/asyncio-api-index.rst:99
msgid"A FIFO queue."
msgstr"先进先出队列"
#:../../library/asyncio-api-index.rst:101
msgid":class:`PriorityQueue`"
msgstr":class:`PriorityQueue`"
#:../../library/asyncio-api-index.rst:102
msgid"A priority queue."
msgstr"优先级队列。"
#:../../library/asyncio-api-index.rst:104
msgid":class:`LifoQueue`"
msgstr":class:`LifoQueue`"
#:../../library/asyncio-api-index.rst:105
msgid"A LIFO queue."
msgstr"后进先出队列。"
#:../../library/asyncio-api-index.rst:110
msgid""
":ref:`Using asyncio.Queue to distribute workload between several Tasks "
"<asyncio_example_queue_dist>`."
msgstr":ref:`使用 asyncio.Queue 在多个并发任务间分配工作量 <asyncio_example_queue_dist>`."
#:../../library/asyncio-api-index.rst:113
msgid"See also the :ref:`Queues documentation page <asyncio-queues>`."
msgstr"请参阅 :ref:`队列集文档 <asyncio-queues>`."
#:../../library/asyncio-api-index.rst:117
msgid"Subprocesses"
msgstr"子进程集"
#:../../library/asyncio-api-index.rst:119
msgid"Utilities to spawn subprocesses and run shell commands."
msgstr"用于生成子进程和运行shell命令的工具包。"
#:../../library/asyncio-api-index.rst:125
msgid"``await`` :func:`create_subprocess_exec`"
msgstr"``await`` :func:`create_subprocess_exec`"
#:../../library/asyncio-api-index.rst:126
msgid"Create a subprocess."
msgstr"创建一个子进程。"
#:../../library/asyncio-api-index.rst:128
msgid"``await`` :func:`create_subprocess_shell`"
msgstr"``await`` :func:`create_subprocess_shell`"
#:../../library/asyncio-api-index.rst:129
msgid"Run a shell command."
msgstr"运行一个shell命令。"
#:../../library/asyncio-api-index.rst:134
msgid":ref:`Executing a shell command <asyncio_example_subprocess_shell>`."
msgstr":ref:`执行一个shell命令 <asyncio_example_subprocess_shell>`."
#:../../library/asyncio-api-index.rst:136
msgid""
"See also the :ref:`subprocess APIs <asyncio-subprocess>` documentation."
msgstr"请参阅 :ref:`子进程 APIs <asyncio-subprocess>` 相关文档."
#:../../library/asyncio-api-index.rst:141
msgid"Streams"
msgstr"流"
#:../../library/asyncio-api-index.rst:143
msgid"High-level APIs to work with network IO."
msgstr"用于网络IO处理的高级API集。"
#:../../library/asyncio-api-index.rst:149
msgid"``await`` :func:`open_connection`"
msgstr"``await`` :func:`open_connection`"
#:../../library/asyncio-api-index.rst:150
msgid"Establish a TCP connection."
msgstr"建立一个TCP连接。"
#:../../library/asyncio-api-index.rst:152
msgid"``await`` :func:`open_unix_connection`"
msgstr"``await`` :func:`open_unix_connection`"
#:../../library/asyncio-api-index.rst:153
msgid"Establish a Unix socket connection."
msgstr"建立一个Unix socket连接。"
#:../../library/asyncio-api-index.rst:155
msgid"``await`` :func:`start_server`"
msgstr"``await`` :func:`start_server`"
#:../../library/asyncio-api-index.rst:156
msgid"Start a TCP server."
msgstr"启动TCP服务。"
#:../../library/asyncio-api-index.rst:158
msgid"``await`` :func:`start_unix_server`"
msgstr"``await`` :func:`start_unix_server`"
#:../../library/asyncio-api-index.rst:159
msgid"Start a Unix socket server."
msgstr"启动一个 Unix 套接字服务。"
#:../../library/asyncio-api-index.rst:161
msgid":class:`StreamReader`"
msgstr":class:`StreamReader`"
#:../../library/asyncio-api-index.rst:162
msgid"High-level async/await object to receive network data."
msgstr"接收网络数据的高级async/await对象。"
#:../../library/asyncio-api-index.rst:164
msgid":class:`StreamWriter`"
msgstr":class:`StreamWriter`"
#:../../library/asyncio-api-index.rst:165
msgid"High-level async/await object to send network data."
msgstr"发送网络数据的高级async/await对象。"
#:../../library/asyncio-api-index.rst:170
msgid":ref:`Example TCP client <asyncio_example_stream>`."
msgstr":ref:`TCP 客户端样例 <asyncio_example_stream>`."
#:../../library/asyncio-api-index.rst:172
msgid"See also the :ref:`streams APIs <asyncio-streams>` documentation."
msgstr"请参阅 :ref:`streams APIs <asyncio-streams>` 文档。"
#:../../library/asyncio-api-index.rst:177
msgid"Synchronization"
msgstr"同步"
#:../../library/asyncio-api-index.rst:179
msgid"Threading-like synchronization primitives that can be used in Tasks."
msgstr"能被用于Task对象集的,类似线程的同步基元组件。"
#:../../library/asyncio-api-index.rst:185
msgid":class:`Lock`"
msgstr":class:`Lock`"
#:../../library/asyncio-api-index.rst:186
msgid"A mutex lock."
msgstr"互斥锁。"
#:../../library/asyncio-api-index.rst:188
msgid":class:`Event`"
msgstr":class:`Event`"
#:../../library/asyncio-api-index.rst:189
msgid"An event object."
msgstr"事件对象。"
#:../../library/asyncio-api-index.rst:191
msgid":class:`Condition`"
msgstr":class:`Condition`"
#:../../library/asyncio-api-index.rst:192
msgid"A condition object."
msgstr"条件对象"
#:../../library/asyncio-api-index.rst:194
msgid":class:`Semaphore`"
msgstr":class:`Semaphore`"
#:../../library/asyncio-api-index.rst:195
msgid"A semaphore."
msgstr"信号量"
#:../../library/asyncio-api-index.rst:197
msgid":class:`BoundedSemaphore`"
msgstr":class:`BoundedSemaphore`"
#:../../library/asyncio-api-index.rst:198
msgid"A bounded semaphore."
msgstr"有界的信号量。"
#:../../library/asyncio-api-index.rst:200
msgid":class:`Barrier`"
msgstr":class:`Barrier`"
#:../../library/asyncio-api-index.rst:201
msgid"A barrier object."
msgstr"一个 Barrier 对象。"
#:../../library/asyncio-api-index.rst:206
msgid":ref:`Using asyncio.Event <asyncio_example_sync_event>`."
msgstr":ref:`asyncio.Event 的用法 <asyncio_example_sync_event>`."
#:../../library/asyncio-api-index.rst:208
msgid":ref:`Using asyncio.Barrier <asyncio_example_barrier>`."
msgstr":ref:`使用 asyncio.Barrier <asyncio_example_barrier>`。"
#:../../library/asyncio-api-index.rst:210
msgid""
"See also the documentation of asyncio :ref:`synchronization primitives "
"<asyncio-sync>`."
msgstr"请参阅asyncio文档 :ref:`synchronization primitives <asyncio-sync>`."
#:../../library/asyncio-api-index.rst:215
msgid"Exceptions"
msgstr"异常"
#:../../library/asyncio-api-index.rst:222
msgid":exc:`asyncio.CancelledError`"
msgstr":exc:`asyncio.CancelledError`"
#:../../library/asyncio-api-index.rst:223
msgid"Raised when a Task is cancelled. See also :meth:`Task.cancel`."
msgstr"当一个Task对象被取消的时候被引发。请参阅 :meth:`Task.cancel`。"
#:../../library/asyncio-api-index.rst:225
msgid":exc:`asyncio.BrokenBarrierError`"
msgstr":exc:`asyncio.BrokenBarrierError`"
#:../../library/asyncio-api-index.rst:226
msgid"Raised when a Barrier is broken. See also :meth:`Barrier.wait`."
msgstr"当一个 Barrier 对象被破坏时引发。 另请参阅 :meth:`Barrier.wait`。"
#:../../library/asyncio-api-index.rst:231
msgid""
":ref:`Handling CancelledError to run code on cancellation request "
"<asyncio_example_task_cancel>`."
msgstr""
":ref:`在取消请求发生的运行代码中如何处理CancelledError异常 <asyncio_example_task_cancel>`."
#:../../library/asyncio-api-index.rst:234
msgid""
"See also the full list of :ref:`asyncio-specific exceptions <asyncio-"
"exceptions>`."
msgstr"请参阅完整的 :ref:`asyncio 专用异常 <asyncio-exceptions>` 列表."