GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — python-docs-ja/library/asyncio-runner.po at 3.14 · python/python-docs-ja Expand file tree/ Copy pathasyncio-runner.poMore file actions 317 lines (276 loc) · 13.3 KB / Copy pathasyncio-runner.poFile metadata and controls317 lines (276 loc) · 13.3 KB 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 # SOME DESCRIPTIVE TITLE. # Copyright (C) 2001 Python Software Foundation # This file is distributed under the same license as the Python package. # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. # # Translators: # python-doc bot, 2025 # Takanori Suzuki <[email protected]>, 2026 # #, fuzzy msgid "" msgstr "" "Project-Id-Version: Python 3.15\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2026-10-01 19:07+0000\n" "PO-Revision-Date: 2025-09-16 00:00+0000\n" "Last-Translator: Takanori Suzuki <[email protected]>, 2026\n" "Language-Team: Japanese (https://app.transifex.com/python-doc/teams/5390/" "ja/)\n" "Language: ja\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" msgid "Runners" msgstr "Runner" #: ../../library/asyncio-runner.rst:8 msgid "**Source code:** :source:`Lib/asyncio/runners.py`" msgstr "**ソースコード:** :source:`Lib/asyncio/runners.py`" #: ../../library/asyncio-runner.rst:11 msgid "" "This section outlines high-level asyncio primitives to run asyncio code." msgstr "" "この節では、asyncio のコードを実行するための高レベルの asyncio のプリミティブ" "の概略を解説します。" #: ../../library/asyncio-runner.rst:13 msgid "" "They are built on top of an :ref:`event loop <asyncio-event-loop>` with the " "aim to simplify async code usage for common wide-spread scenarios." msgstr "" "これらは :ref:`イベントループ <asyncio-event-loop>` の上に構築されており、一" "般的な広く普及しているシナリオでの非同期コードの使用を簡素化することを目的と" "しています。" #: ../../library/asyncio-runner.rst:23 msgid "Running an asyncio Program" msgstr "非同期プログラムの実行" msgid "Execute *coro* in an asyncio event loop and return the result." msgstr "asyncio のイベントループで *coro* を実行し、その結果を返します。" msgid "The argument can be any awaitable object." msgstr "引数には任意の awaitable オブジェクトを指定できます。" msgid "" "This function runs the awaitable, taking care of managing the asyncio event " "loop, *finalizing asynchronous generators*, and closing the executor." msgstr "" "この関数は awaitable を実行し、asyncio のイベントループの管理、*非同期ジェネ" "レーターの終了処理*、Executor の終了処理を行います。" #: ../../library/asyncio-runner.rst:35 ../../library/asyncio-runner.rst:131 msgid "" "This function cannot be called when another asyncio event loop is running in " "the same thread." msgstr "" "この関数は、同じスレッドで他の非同期イベントループが実行中のときは呼び出せま" "せん。" #: ../../library/asyncio-runner.rst:38 ../../library/asyncio-runner.rst:97 msgid "" "If *debug* is ``True``, the event loop will be run in debug mode. ``False`` " "disables debug mode explicitly. ``None`` is used to respect the " "global :ref:`asyncio-debug-mode` settings." msgstr "" "*debug* が ``True`` の場合、イベントループはデバッグモードで実行されます。" "``False`` は明示的にデバッグモードを無効化します。 グローバル" "な :ref:`asyncio-debug-mode` 設定を尊重するために ``None`` が使用されます。" msgid "" "If *loop_factory* is not ``None``, it is used to create a new event loop; " "otherwise :func:`asyncio.new_event_loop` is used. The loop is closed at the " "end. This function should be used as a main entry point for asyncio " "programs, and should ideally only be called once. It is recommended to use " "*loop_factory* to configure the event loop instead of policies. " "Passing :class:`asyncio.EventLoop` allows running asyncio without the policy " "system." msgstr "" "*loop_factory* が ``None`` でなければ、それを使って新しいイベントループを作成" "します。\n" "それ以外の場合は :func:`asyncio.new_event_loop` を使います。\n" "終了時にループを閉じます。\n" "この関数は asyncio プログラムのメインのエントリーポイントとして使い、できれば" "一度だけ呼び出してください。\n" "イベントループの設定には、ポリシーの代わりに *loop_factory* を使うことを推奨" "します。\n" ":class:`asyncio.EventLoop` を渡すと、ポリシーシステムを使わずに asyncio を実" "行できます。" msgid "" "The executor is given a timeout duration of 5 minutes to shutdown. If the " "executor hasn't finished within that duration, a warning is emitted and the " "executor is closed." msgstr "" "Executor の終了を待つ制限時間は 5 分です。\n" "その時間内に終了しなければ、警告を出して Executor の終了処理を行います。" #: ../../library/asyncio-runner.rst:54 msgid "Example::" msgstr "以下はプログラム例です::" msgid "" "async def main():\n" " await asyncio.sleep(1)\n" " print('hello')\n" "\n" "asyncio.run(main())" msgstr "" "async def main():\n" " await asyncio.sleep(1)\n" " print('hello')\n" "\n" "asyncio.run(main())" #: ../../library/asyncio-runner.rst:64 msgid "Updated to use :meth:`loop.shutdown_default_executor`." msgstr "" ":meth:`loop.shutdown_default_executor` メソッドを使うように更新されました。" #: ../../library/asyncio-runner.rst:69 msgid "" "*debug* is ``None`` by default to respect the global debug mode settings." msgstr "" "*debug* はグローバルなデバッグモード設定を尊重するためにデフォルトで " "``None`` です。" #: ../../library/asyncio-runner.rst:73 msgid "Added *loop_factory* parameter." msgstr "*loop_factory* 引数が追加されました。" msgid "*coro* can be any awaitable object." msgstr "*coro* に任意の awaitable オブジェクトを指定できるようになりました。" msgid "" "The :mod:`!asyncio` policy system is deprecated and will be removed in " "Python 3.16; from there on, an explicit *loop_factory* is needed to " "configure the event loop." msgstr "" ":mod:`!asyncio` のポリシーシステムは非推奨で、Python 3.16 で削除されます。\n" "それ以降、イベントループを設定するには *loop_factory* を明示的に指定する必要" "があります。" msgid "Runner context manager" msgstr "Runner コンテキストマネージャー" #: ../../library/asyncio-runner.rst:91 msgid "" "A context manager that simplifies *multiple* async function calls in the " "same context." msgstr "" "同じコンテキスト上での *複数* の非同期関数呼び出しをシンプルにするコンテキス" "トマネージャ。" msgid "" "Sometimes several top-level async functions should be called in the " "same :ref:`event loop <asyncio-event-loop>` and :class:`contextvars.Context`." msgstr "" "複数のトップレベルの非同期関数を、同じ :ref:`イベントループ <asyncio-event-" "loop>` と :class:`contextvars.Context` で呼び出したい場合があります。" msgid "" "*loop_factory* could be used for overriding the loop creation. It is the " "responsibility of the *loop_factory* to set the created loop as the current " "one. By default :func:`asyncio.new_event_loop` is used and set as current " "event loop with :func:`asyncio.set_event_loop` if *loop_factory* is ``None``." msgstr "" "*loop_factory* で、ループの作成方法を変更できます。\n" "作成したループを現在のループとして設定するのは *loop_factory* の役割です。\n" "*loop_factory* が ``None`` の場合は、デフォルト" "で :func:`asyncio.new_event_loop` を使い、:func:`asyncio.set_event_loop` で現" "在のイベントループに設定します。" msgid "" "Basically, :func:`asyncio.run` example can be rewritten with the runner " "usage::" msgstr "" ":func:`asyncio.run` の例は、Runner を使って次のように書き換えられます。 ::" msgid "" "async def main():\n" " await asyncio.sleep(1)\n" " print('hello')\n" "\n" "with asyncio.Runner() as runner:\n" " runner.run(main())" msgstr "" "async def main():\n" " await asyncio.sleep(1)\n" " print('hello')\n" "\n" "with asyncio.Runner() as runner:\n" " runner.run(main())" msgid "Execute *coro* in the embedded event loop." msgstr "内部のイベントループで *coro* を実行します。" msgid "If the argument is a coroutine, it is wrapped in a Task." msgstr "引数がコルーチンの場合、Task でラップします。" msgid "" "An optional keyword-only *context* argument allows specifying a " "custom :class:`contextvars.Context` for the code to run in. The runner's " "default context is used if context is ``None``." msgstr "" "省略可能なキーワード専用引数 *context* には、コードの実行に使" "う :class:`contextvars.Context` を指定できます。\n" "``context`` が ``None`` の場合は、Runner のデフォルトのコンテキストを使いま" "す。" msgid "Returns the awaitable's result or raises an exception." msgstr "awaitable の結果を返すか、例外を送出します。" msgid "Close the runner." msgstr "Runner を閉じます。" msgid "" "Finalize asynchronous generators, shutdown default executor, close the event " "loop and release embedded :class:`contextvars.Context`." msgstr "" "非同期ジェネレーターの終了処理を行い、デフォルトの Executor とイベントループ" "を閉じ、内部の :class:`contextvars.Context` を解放します。" msgid "Return the event loop associated with the runner instance." msgstr "Runner インスタンスに関連付けられたイベントループを返します。" msgid "" ":class:`Runner` uses the lazy initialization strategy, its constructor " "doesn't initialize underlying low-level structures." msgstr "" ":class:`Runner` は遅延初期化を採用しており、コンストラクターでは内部の低水準" "なデータ構造を初期化しません。" msgid "" "Embedded *loop* and *context* are created at the :keyword:`with` body " "entering or the first call of :meth:`run` or :meth:`get_loop`." msgstr "" "内部の *loop* と *context* は、:keyword:`with` 文の本体に入るとき、また" "は :meth:`run` か :meth:`get_loop` を初めて呼び出すときに作成されます。" msgid "Handling Keyboard Interruption" msgstr "キーボード割り込みの処理" msgid "" "When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-" "C`, :exc:`KeyboardInterrupt` exception is raised in the main thread by " "default. However this doesn't work with :mod:`asyncio` because it can " "interrupt asyncio internals and can hang the program from exiting." msgstr "" ":kbd:`Ctrl-C` で :const:`signal.SIGINT` が発生すると、デフォルトではメインス" "レッドで :exc:`KeyboardInterrupt` が送出されます。\n" "しかし :mod:`asyncio` では、内部の処理が中断されてプログラムが終了できなくな" "る可能性があるため、この動作は適していません。" msgid "" "To mitigate this issue, :mod:`asyncio` handles :const:`signal.SIGINT` as " "follows:" msgstr "" "この問題を軽減するため、:mod:`asyncio` は :const:`signal.SIGINT` を次のように" "処理します。" msgid "" ":meth:`asyncio.Runner.run` installs a custom :const:`signal.SIGINT` handler " "before any user code is executed and removes it when exiting from the " "function." msgstr "" ":meth:`asyncio.Runner.run` はユーザーコードの実行前に独自" "の :const:`signal.SIGINT` ハンドラーを設定し、関数を終了するときに取り除きま" "す。" msgid "" "The :class:`~asyncio.Runner` creates the main task for the passed coroutine " "for its execution." msgstr "" ":class:`~asyncio.Runner` は、渡されたコルーチンを実行するメインタスクを作成し" "ます。" msgid "" "When :const:`signal.SIGINT` is raised by :kbd:`Ctrl-C`, the custom signal " "handler cancels the main task by calling :meth:`asyncio.Task.cancel` which " "raises :exc:`asyncio.CancelledError` inside the main task. This causes the " "Python stack to unwind, ``try/except`` and ``try/finally`` blocks can be " "used for resource cleanup. After the main task is " "cancelled, :meth:`asyncio.Runner.run` raises :exc:`KeyboardInterrupt`." msgstr "" ":kbd:`Ctrl-C` によって :const:`signal.SIGINT` が発生すると、独自のシグナルハ" "ンドラーが :meth:`asyncio.Task.cancel` を呼び出してメインタスクをキャンセルし" "ます。\n" "これにより、メインタスク内で :exc:`asyncio.CancelledError` が送出されます。\n" "Python のスタックが巻き戻されるため、``try/except`` や ``try/finally`` ブロッ" "クでリソースを解放できます。\n" "メインタスクのキャンセル後、:meth:`asyncio.Runner.run` " "は :exc:`KeyboardInterrupt` を送出します。" msgid "" "A user could write a tight loop which cannot be interrupted " "by :meth:`asyncio.Task.cancel`, in which case the second " "following :kbd:`Ctrl-C` immediately raises the :exc:`KeyboardInterrupt` " "without cancelling the main task." msgstr "" "ユーザーが書いたループが処理を譲らずに繰り返し続" "け、:meth:`asyncio.Task.cancel` で中断できない場合があります。\n" "その場合、2 回目の :kbd:`Ctrl-C` はメインタスクをキャンセルせず、即座" "に :exc:`KeyboardInterrupt` を送出します。" |
| You are visitor 01402520 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |