@@ -2143,6 +2143,9 @@ msgid ""
21432143"written this way; consider using the high-level functions like "
21442144":func:`asyncio.run`."
21452145msgstr ""
2146+ "请注意本节中的所有示例都 **有意地** 演示了如何使用低层级的事件循环 API,例如 :meth:`loop.run_forever` 和 "
2147+ ":meth:`loop.call_soon`。 现代的 asyncio 应用很少需要以这样的方式编写;请考虑使用高层级的函数例如 "
2148+ ":func:`asyncio.run`。"
21462149
21472150#: ../../library/asyncio-eventloop.rst:1545
21482151msgid "Hello World with call_soon()"
@@ -2153,12 +2156,13 @@ msgid ""
21532156"An example using the :meth:`loop.call_soon` method to schedule a callback. "
21542157"The callback displays ``\" Hello World\" `` and then stops the event loop::"
21552158msgstr ""
2159+ "一个使用 :meth:`loop.call_soon` 方法来安排回调的示例。 回调会显示 ``\" Hello World\" `` 然后停止事件循环::"
21562160
21572161#: ../../library/asyncio-eventloop.rst:1571
21582162msgid ""
21592163"A similar :ref:`Hello World <coroutine>` example created with a coroutine "
21602164"and the :func:`run` function."
2161- msgstr ""
2165+ msgstr "一个类似的 :ref:`Hello World <coroutine>` 示例,使用协程和 :func:`run` 函数创建。 "
21622166
21632167#: ../../library/asyncio-eventloop.rst:1578
21642168msgid "Display the current date with call_later()"
@@ -2170,12 +2174,14 @@ msgid ""
21702174"callback uses the :meth:`loop.call_later` method to reschedule itself after "
21712175"5 seconds, and then stops the event loop::"
21722176msgstr ""
2177+ "一个每秒刷新显示当前日期的示例。 回调使用 :meth:`loop.call_later` 方法在 5 秒后将自身重新加入计划日程,然后停止事件循环::"
21732178
21742179#: ../../library/asyncio-eventloop.rst:1608
21752180msgid ""
21762181"A similar :ref:`current date <asyncio_example_sleep>` example created with a"
21772182" coroutine and the :func:`run` function."
21782183msgstr ""
2184+ "一个类似的 :ref:`current date <asyncio_example_sleep>` 示例,使用协程和 :func:`run` 函数创建。"
21792185
21802186#: ../../library/asyncio-eventloop.rst:1615
21812187msgid "Watch a file descriptor for read events"
@@ -2192,23 +2198,29 @@ msgid ""
21922198"A similar :ref:`example <asyncio_example_create_connection>` using "
21932199"transports, protocols, and the :meth:`loop.create_connection` method."
21942200msgstr ""
2201+ "一个类似的 :ref:`示例 <asyncio_example_create_connection>`,使用传输、协议和 "
2202+ ":meth:`loop.create_connection` 方法创建。"
21952203
21962204#: ../../library/asyncio-eventloop.rst:1659
21972205msgid ""
21982206"Another similar :ref:`example <asyncio_example_create_connection-streams>` "
21992207"using the high-level :func:`asyncio.open_connection` function and streams."
22002208msgstr ""
2209+ "另一个类似的 :ref:`示例 <asyncio_example_create_connection-streams>`,使用了高层级的 "
2210+ ":func:`asyncio.open_connection` 函数和流。"
22012211
22022212#: ../../library/asyncio-eventloop.rst:1667
22032213msgid "Set signal handlers for SIGINT and SIGTERM"
22042214msgstr "为SIGINT和SIGTERM设置信号处理器"
22052215
22062216#: ../../library/asyncio-eventloop.rst:1669
22072217msgid "(This ``signals`` example only works on Unix.)"
2208- msgstr ""
2218+ msgstr "(这个 ``signals`` 示例只适用于 Unix。) "
22092219
22102220#: ../../library/asyncio-eventloop.rst:1671
22112221msgid ""
22122222"Register handlers for signals :py:data:`SIGINT` and :py:data:`SIGTERM` using"
22132223" the :meth:`loop.add_signal_handler` method::"
22142224msgstr ""
2225+ "使用 :meth:`loop.add_signal_handler` 方法为信号 :py:data:`SIGINT` 和 "
2226+ ":py:data:`SIGTERM` 注册处理程序::"
0 commit comments