@@ -58,7 +58,7 @@ msgstr "単にコルーチンを呼び出しただけでは、コルーチンの
58
58
59
59
#: ../../library/asyncio-task.rst:43
60
60
msgid "To actually run a coroutine, asyncio provides three main mechanisms:"
61
- msgstr "実際にコルーチンを実行するために 、 asyncio は3つの機構を提供しています:"
61
+ msgstr "実際にコルーチンを走らせるために 、 asyncio は3つの機構を提供しています:"
62
62
63
63
#: ../../library/asyncio-task.rst:45
64
64
msgid ""
@@ -98,7 +98,7 @@ msgstr "上のコード例を編集して、ふたつの ``say_after`` コルー
98
98
msgid ""
99
99
"Note that expected output now shows that the snippet runs 1 second faster "
100
100
"than before::"
101
- msgstr "予想される出力が前回よりも 1 秒早く表示されていることに注意してください ::"
101
+ msgstr "予想される出力が、スニペットの実行が前回よりも 1 秒早いことを示していることに注意してください ::"
102
102
103
103
#: ../../library/asyncio-task.rst:110
104
104
msgid "Awaitables"
@@ -205,7 +205,7 @@ msgstr ""
205
205
msgid ""
206
206
"A good example of a low-level function that returns a Future object is "
207
207
":meth:`loop.run_in_executor`."
208
- msgstr ""
208
+ msgstr "Future オブジェクトを返す低レベル関数の良い例は :meth:`loop.run_in_executor` です。 "
209
209
210
210
#: ../../library/asyncio-task.rst:211
211
211
msgid "Running an asyncio Program"
@@ -240,7 +240,9 @@ msgstr ""
240
240
msgid ""
241
241
"**Important:** this function has been added to asyncio in Python 3.7 on a "
242
242
":term:`provisional basis <provisional api>`."
243
- msgstr "**重要:** この関数は Python 3.7 で暫定 API として asyncio に追加されました。"
243
+ msgstr ""
244
+ "**重要:** この関数は Python 3.7 で :term:`暫定 API <provisional api>` として asyncio "
245
+ "に追加されました。"
244
246
245
247
#: ../../library/asyncio-task.rst:234
246
248
msgid "Creating Tasks"
@@ -356,6 +358,8 @@ msgid ""
356
358
"cancelled in this case. This is to prevent the cancellation of one "
357
359
"submitted Task/Future to cause other Tasks/Futures to be cancelled."
358
360
msgstr ""
361
+ "*aws* シーケンスにある Task あるいは Future が *キャンセル* された場合、 :exc:`CancelledError` を送出したかのうように扱われます。つまり、この場合 ``gather()`` 呼び出しはキャンセル *されません*。\n"
362
+ "これは、起動された 1 つの Task あるいは Future のキャンセルが、他の Task あるいは Future のキャンセルを引き起こすのを避けるためです。"
359
363
360
364
#: ../../library/asyncio-task.rst:333 ../../library/asyncio-task.rst:439
361
365
#: ../../library/asyncio-task.rst:561
@@ -366,25 +370,27 @@ msgstr "以下はプログラム例です::"
366
370
msgid ""
367
371
"If the *gather* itself is cancelled, the cancellation is propagated "
368
372
"regardless of *return_exceptions*."
369
- msgstr ""
373
+ msgstr "*gather* 自身がキャンセルされた場合は、 *return_exceptions* の値に関わらずキャンセルが伝搬されます。 "
370
374
371
375
#: ../../library/asyncio-task.rst:373
372
376
msgid "Shielding From Cancellation"
373
- msgstr ""
377
+ msgstr "キャンセルからの保護 "
374
378
375
379
#: ../../library/asyncio-task.rst:377
376
380
msgid ""
377
381
"Protect an :ref:`awaitable object <asyncio-awaitables>` from being "
378
382
":meth:`cancelled <Task.cancel>`."
379
383
msgstr ""
384
+ ":meth:`キャンセル <Task.cancel>` から :ref:`awaitable オプジェクト <asyncio-awaitables>` "
385
+ "を保護します。"
380
386
381
387
#: ../../library/asyncio-task.rst:380 ../../library/asyncio-task.rst:417
382
388
msgid "If *aw* is a coroutine it is automatically scheduled as a Task."
383
- msgstr ""
389
+ msgstr "*aw* がコルーチンだった場合、自動的に Task としてスケジュールされます。 "
384
390
385
391
#: ../../library/asyncio-task.rst:382
386
392
msgid "The statement::"
387
- msgstr "命令文 ::"
393
+ msgstr "文 ::"
388
394
389
395
#: ../../library/asyncio-task.rst:386
390
396
msgid "is equivalent to::"
@@ -398,63 +404,74 @@ msgid ""
398
404
"still cancelled, so the \" await\" expression still raises a "
399
405
":exc:`CancelledError`."
400
406
msgstr ""
407
+ "それを含むコルーチンがキャンセルされた場合を *除き*、``something()`` 内で動作している Task はキャンセルされません。\n"
408
+ "``something()`` 側から見るとキャンセルは発生しません。\n"
409
+ "呼び出し元がキャンセルされた場合でも、 \" await\" 式は :exc:`CancelledError` を送出します。"
401
410
402
411
#: ../../library/asyncio-task.rst:396
403
412
msgid ""
404
413
"If ``something()`` is cancelled by other means (i.e. from within itself) "
405
414
"that would also cancel ``shield()``."
406
415
msgstr ""
416
+ "注意: ``something()`` が他の理由 (例えば、原因が自分自身) でキャンセルされた場合は ``shield()`` でも保護できません。"
407
417
408
418
#: ../../library/asyncio-task.rst:399
409
419
msgid ""
410
420
"If it is desired to completely ignore cancellation (not recommended) the "
411
421
"``shield()`` function should be combined with a try/except clause, as "
412
422
"follows::"
413
423
msgstr ""
424
+ "完全にキャンセルを無視したい場合 (推奨はしません) は、 ``shield()`` 関数は次のように try/except "
425
+ "節と組み合わせることになるでしょう::"
414
426
415
427
#: ../../library/asyncio-task.rst:410
416
428
msgid "Timeouts"
417
- msgstr ""
429
+ msgstr "タイムアウト "
418
430
419
431
#: ../../library/asyncio-task.rst:414
420
432
msgid ""
421
433
"Wait for the *aw* :ref:`awaitable <asyncio-awaitables>` to complete with a "
422
434
"timeout."
423
- msgstr ""
435
+ msgstr "*aw* :ref:`awaitable <asyncio-awaitables>` が、タイムアウトで完了するのを待ちます。 "
424
436
425
437
#: ../../library/asyncio-task.rst:419
426
438
msgid ""
427
439
"*timeout* can either be ``None`` or a float or int number of seconds to wait"
428
440
" for. If *timeout* is ``None``, block until the future completes."
429
441
msgstr ""
442
+ "*timeout* には ``None`` もしくは待つ秒数の浮動小数点数か整数を指定できます。\n"
443
+ "*timeout* が ``None`` の場合、 Future が完了するまで待ちます。"
430
444
431
445
#: ../../library/asyncio-task.rst:423
432
446
msgid ""
433
447
"If a timeout occurs, it cancels the task and raises "
434
448
":exc:`asyncio.TimeoutError`."
435
- msgstr ""
449
+ msgstr "タイムアウトが起きた場合は、 Task をキャンセルし :exc:`asyncio.TimeoutError` を送出します。 "
436
450
437
451
#: ../../library/asyncio-task.rst:426
438
452
msgid ""
439
453
"To avoid the task :meth:`cancellation <Task.cancel>`, wrap it in "
440
454
":func:`shield`."
441
455
msgstr ""
456
+ "Task の :meth:`キャンセル <Task.cancel>` を避けるためには、 :func:`shield` の中にラップしてください。"
442
457
443
458
#: ../../library/asyncio-task.rst:429
444
459
msgid ""
445
460
"The function will wait until the future is actually cancelled, so the total "
446
461
"wait time may exceed the *timeout*."
447
- msgstr ""
462
+ msgstr "この関数は、 Future が実際にキャンセルされるまで待つので、全体の待ち時間は *timeout* を超えることもあります。 "
448
463
449
464
#: ../../library/asyncio-task.rst:432
450
465
msgid "If the wait is cancelled, the future *aw* is also cancelled."
451
- msgstr ""
466
+ msgstr "待機が中止された場合 *aw* も中止されます。 "
452
467
453
468
#: ../../library/asyncio-task.rst:459
454
469
msgid ""
455
470
"When *aw* is cancelled due to a timeout, ``wait_for`` waits for *aw* to be "
456
471
"cancelled. Previously, it raised :exc:`asyncio.TimeoutError` immediately."
457
472
msgstr ""
473
+ "*aw* がタイムアウトでキャンセルされたとき、 ``wait_for`` は *aw* がキャンセルされるまで待ちます。\n"
474
+ "以前は、すぐに :exc:`asyncio.TimeoutError` を送出していました。"
458
475
459
476
#: ../../library/asyncio-task.rst:466
460
477
msgid "Waiting Primitives"
0 commit comments