Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d0412ae

Browse files
committed
[po] auto sync bot
1 parent a53d856 commit d0412ae

1 file changed

Lines changed: 20 additions & 14 deletions

File tree

library/asyncio-task.po

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ msgid ""
145145
"When a coroutine is wrapped into a *Task* with functions like "
146146
":func:`asyncio.create_task` the coroutine is automatically scheduled to run "
147147
"soon::"
148-
msgstr "当一个协程通过 :func:`asyncio.create_task` 等函数被打包到一个 *任务*,该协程将自动排入日程准备立即执行::"
148+
msgstr "当一个协程通过 :func:`asyncio.create_task` 等函数被打包为一个 *任务*,该协程将自动排入日程准备立即运行::"
149149

150150
#: ../../library/asyncio-task.rst:181
151151
msgid "Futures"
@@ -189,93 +189,99 @@ msgstr "一个很好的返回对象的低层级函数的示例是 :meth:`loop.ru
189189

190190
#: ../../library/asyncio-task.rst:211
191191
msgid "Running an asyncio Program"
192-
msgstr ""
192+
msgstr "运行 asyncio 程序"
193193

194194
#: ../../library/asyncio-task.rst:215
195195
msgid ""
196196
"This function runs the passed coroutine, taking care of managing the asyncio"
197197
" event loop and *finalizing asynchronous generators*."
198-
msgstr ""
198+
msgstr "此函数运行传入的协程,负责管理 asyncio 事件循环并 *完结异步生成器*。"
199199

200200
#: ../../library/asyncio-task.rst:219
201201
msgid ""
202202
"This function cannot be called when another asyncio event loop is running in"
203203
" the same thread."
204-
msgstr ""
204+
msgstr "当有其他 asyncio 事件循环在同一线程中运行时,此函数不能被调用。"
205205

206206
#: ../../library/asyncio-task.rst:222
207207
msgid "If *debug* is ``True``, the event loop will be run in debug mode."
208-
msgstr ""
208+
msgstr "如果 *debug* 为 ``True``,事件循环将以调试模式运行。"
209209

210210
#: ../../library/asyncio-task.rst:224
211211
msgid ""
212212
"This function always creates a new event loop and closes it at the end. It "
213213
"should be used as a main entry point for asyncio programs, and should "
214214
"ideally only be called once."
215-
msgstr ""
215+
msgstr "此函数总是会创建一个新的事件循环并在结束时关闭之。它应当被用作 asyncio 程序的主入口点,理想情况下应当只被调用一次。"
216216

217217
#: ../../library/asyncio-task.rst:228
218218
msgid ""
219219
"**Important:** this function has been added to asyncio in Python 3.7 on a "
220220
":term:`provisional basis <provisional api>`."
221221
msgstr ""
222+
"**重要:** 此函数是在 Python 3.7 中加入 asyncio 模块,处于 :term:`暂定基准状态 <provisional api>`。"
222223

223224
#: ../../library/asyncio-task.rst:234
224225
msgid "Creating Tasks"
225-
msgstr ""
226+
msgstr "创建任务"
226227

227228
#: ../../library/asyncio-task.rst:238
228229
msgid ""
229230
"Wrap the *coro* :ref:`coroutine <coroutine>` into a :class:`Task` and "
230231
"schedule its execution. Return the Task object."
231232
msgstr ""
233+
"将 *coro* :ref:`协程 <coroutine>` 打包为一个 :class:`Task` 排入日程准备执行。返回 Task 对象。"
232234

233235
#: ../../library/asyncio-task.rst:241
234236
msgid ""
235237
"The task is executed in the loop returned by :func:`get_running_loop`, "
236238
":exc:`RuntimeError` is raised if there is no running loop in current thread."
237239
msgstr ""
240+
"该任务会在 :func:`get_running_loop` 返回的循环中执行,如果当前线程没有在运行的循环则会引发 "
241+
":exc:`RuntimeError`。"
238242

239243
#: ../../library/asyncio-task.rst:245
240244
msgid ""
241245
"This function has been **added in Python 3.7**. Prior to Python 3.7, the "
242246
"low-level :func:`asyncio.ensure_future` function can be used instead::"
243247
msgstr ""
248+
"此函数 **在 Python 3.7 中被加入**。在 Python 3.7 之前,可以改用低层级的 "
249+
":func:`asyncio.ensure_future` 函数。"
244250

245251
#: ../../library/asyncio-task.rst:264
246252
msgid "Sleeping"
247-
msgstr ""
253+
msgstr "休眠"
248254

249255
#: ../../library/asyncio-task.rst:268
250256
msgid "Block for *delay* seconds."
251-
msgstr ""
257+
msgstr "阻塞 *delay* 指定的秒数。"
252258

253259
#: ../../library/asyncio-task.rst:270
254260
msgid ""
255261
"If *result* is provided, it is returned to the caller when the coroutine "
256262
"completes."
257-
msgstr ""
263+
msgstr "如果指定了 *result*,则当协程完成时将其返回给调用者。"
258264

259265
#: ../../library/asyncio-task.rst:273
260266
msgid ""
261267
"``sleep()`` always suspends the current task, allowing other tasks to run."
262-
msgstr ""
268+
msgstr "``sleep()`` 总是会挂起当前任务,以允许其他任务运行。"
263269

264270
#: ../../library/asyncio-task.rst:276 ../../library/asyncio-task.rst:434
265271
#: ../../library/asyncio-task.rst:486
266272
msgid ""
267273
"The *loop* argument is deprecated and scheduled for removal in Python 3.10."
268-
msgstr ""
274+
msgstr "*loop* 参数已弃用,计划在 Python 3.10 中移除。"
269275

270276
#: ../../library/asyncio-task.rst:281
271277
msgid ""
272278
"Example of coroutine displaying the current date every second for 5 "
273279
"seconds::"
274-
msgstr ""
280+
msgstr "以下协程示例运行 5 秒,每秒显示一次当前日期::"
275281

276282
#: ../../library/asyncio-task.rst:300
277283
msgid "Running Tasks Concurrently"
278-
msgstr ""
284+
msgstr "并发运行任务"
279285

280286
#: ../../library/asyncio-task.rst:304
281287
msgid ""

0 commit comments

Comments
 (0)