@@ -65,18 +65,17 @@ msgid "In addition to enabling the debug mode, consider also:"
65
65
msgstr "디버그 모드를 활성화하는 것 외에도, 다음을 고려하십시오:"
66
66
67
67
#: ../../library/asyncio-dev.rst:36
68
- #, fuzzy
69
68
msgid ""
70
69
"setting the log level of the :ref:`asyncio logger <asyncio-logger>` to "
71
70
":py:const:`logging.DEBUG`, for example the following snippet of code can "
72
71
"be run at startup of the application::"
73
72
msgstr ""
74
- ":ref:`asyncio 로거 <asyncio-logger>`\\ 의 로그 수준을 :py:data :`logging.DEBUG`\\ 로 "
75
- "설정, 예를 들어 응용 프로그램 시작 시 다음 코드 조각을 실행할 수 있습니다::"
73
+ ":ref:`asyncio 로거 <asyncio-logger>`\\ 의 로그 수준을 :py:const :`logging.DEBUG`\\ 로"
74
+ " 설정, 예를 들어 응용 프로그램 시작 시 다음 코드 조각을 실행할 수 있습니다::"
76
75
77
76
#: ../../library/asyncio-dev.rst:40
78
77
msgid "logging.basicConfig(level=logging.DEBUG)"
79
- msgstr ""
78
+ msgstr "logging.basicConfig(level=logging.DEBUG) "
80
79
81
80
#: ../../library/asyncio-dev.rst:42
82
81
msgid ""
@@ -116,14 +115,13 @@ msgid ""
116
115
msgstr "I/O 선택기의 실행 시간은 I/O 연산 수행에 너무 오래 걸리면 로그 됩니다."
117
116
118
117
#: ../../library/asyncio-dev.rst:60
119
- #, fuzzy
120
118
msgid ""
121
119
"Callbacks taking longer than 100 milliseconds are logged. The "
122
120
":attr:`loop.slow_callback_duration` attribute can be used to set the "
123
121
"minimum execution duration in seconds that is considered \" slow\" ."
124
122
msgstr ""
125
- "100ms보다 오래 걸리는 콜백이 로그 됩니다. :attr:`loop.slow_callback_duration` 어트리뷰트는 "
126
- "\" 느린\" 것으로 간주할 최소 실행 시간(초)을 설정하는 데 사용될 수 있습니다."
123
+ "100 밀리 초 보다 오래 걸리는 콜백이 로그 됩니다. :attr:`loop.slow_callback_duration` 어트리뷰트는"
124
+ " \" 느린\" 것으로 간주할 최소 실행 시간(초)을 설정하는 데 사용될 수 있습니다."
127
125
128
126
#: ../../library/asyncio-dev.rst:68
129
127
msgid "Concurrency and Multithreading"
@@ -151,7 +149,7 @@ msgstr ""
151
149
152
150
#: ../../library/asyncio-dev.rst:79
153
151
msgid "loop.call_soon_threadsafe(callback, *args)"
154
- msgstr ""
152
+ msgstr "loop.call_soon_threadsafe(callback, *args) "
155
153
156
154
#: ../../library/asyncio-dev.rst:81
157
155
msgid ""
@@ -167,7 +165,7 @@ msgstr ""
167
165
168
166
#: ../../library/asyncio-dev.rst:87
169
167
msgid "loop.call_soon_threadsafe(fut.cancel)"
170
- msgstr ""
168
+ msgstr "loop.call_soon_threadsafe(fut.cancel) "
171
169
172
170
#: ../../library/asyncio-dev.rst:89
173
171
msgid ""
@@ -189,11 +187,18 @@ msgid ""
189
187
"# Wait for the result:\n"
190
188
"result = future.result()"
191
189
msgstr ""
190
+ "async def coro_func():\n"
191
+ " return await asyncio.sleep(1, 42)\n"
192
+ "\n"
193
+ "# 나중에 다른 OS 스레드에서:\n"
194
+ "\n"
195
+ "future = asyncio.run_coroutine_threadsafe(coro_func(), loop)\n"
196
+ "# 결과를 기다립니다:\n"
197
+ "result = future.result()"
192
198
193
199
#: ../../library/asyncio-dev.rst:102
194
- #, fuzzy
195
200
msgid "To handle signals the event loop must be run in the main thread."
196
- msgstr "시그널을 처리하고 자식 프로세스를 실행하려면 , 이벤트 루프를 메인 스레드에서 실행해야 합니다."
201
+ msgstr "시그널을 처리하려면 , 이벤트 루프를 메인 스레드에서 실행해야 합니다."
197
202
198
203
#: ../../library/asyncio-dev.rst:105
199
204
msgid ""
@@ -207,7 +212,6 @@ msgstr ""
207
212
"OS 스레드를 블록하지 않고 다른 OS 스레드에서 블로킹 코드를 실행할 수 있습니다."
208
213
209
214
#: ../../library/asyncio-dev.rst:110
210
- #, fuzzy
211
215
msgid ""
212
216
"There is currently no way to schedule coroutines or callbacks directly "
213
217
"from a different process (such as one started with "
@@ -221,10 +225,10 @@ msgid ""
221
225
"different process."
222
226
msgstr ""
223
227
"현재 다른 프로세스(가령 :mod:`multiprocessing`\\ 으로 시작된 프로세스)에서 직접 코루틴이나 콜백을 예약할 방법은"
224
- " 없습니다. :ref:`이벤트 루프 메서드 < asyncio-event-loop> ` 섹션은 이벤트 루프를 블록하지 않고 파이프를 읽고"
225
- " 파일 기술자를 감시할 수 있는 API를 나열합니다. 또한 asyncio의 :ref:`서브 프로세스 <asyncio-"
226
- "subprocess>` API는 프로세스를 시작하고 이벤트 루프에서 프로세스와 통신하는 방법을 제공합니다. 마지막으로, 앞서 언급한"
227
- " :meth:`loop.run_in_executor` 메서드를 "
228
+ " 없습니다. :ref:`asyncio-event-loop-methods ` 섹션은 이벤트 루프를 블록하지 않고 파이프를 읽고 파일 "
229
+ "기술자를 감시할 수 있는 API를 나열합니다. 또한 asyncio의 :ref:`서브 프로세스 <asyncio-subprocess>` "
230
+ " API는 프로세스를 시작하고 이벤트 루프에서 프로세스와 통신하는 방법을 제공합니다. 마지막으로, 앞서 언급한 "
231
+ ":meth:`loop.run_in_executor` 메서드를 "
228
232
":class:`concurrent.futures.ProcessPoolExecutor`\\ 와 함께 사용하여 다른 프로세스에서 코드를 "
229
233
"실행할 수도 있습니다."
230
234
@@ -261,15 +265,14 @@ msgid ""
261
265
msgstr "asyncio는 :mod:`logging` 모듈을 사용하고, 모든 로깅은 ``\" asyncio\" `` 로거를 통해 수행됩니다."
262
266
263
267
#: ../../library/asyncio-dev.rst:145
264
- #, fuzzy
265
268
msgid ""
266
269
"The default log level is :py:const:`logging.INFO`, which can be easily "
267
270
"adjusted::"
268
- msgstr "기본 로그 수준은 :py:data :`logging.INFO`\\ 며, 쉽게 조정할 수 있습니다::"
271
+ msgstr "기본 로그 수준은 :py:const :`logging.INFO`\\ 며, 쉽게 조정할 수 있습니다::"
269
272
270
273
#: ../../library/asyncio-dev.rst:148
271
274
msgid "logging.getLogger(\" asyncio\" ).setLevel(logging.WARNING)"
272
- msgstr ""
275
+ msgstr "logging.getLogger( \" asyncio \" ).setLevel(logging.WARNING) "
273
276
274
277
#: ../../library/asyncio-dev.rst:151
275
278
msgid ""
@@ -304,6 +307,15 @@ msgid ""
304
307
"\n"
305
308
"asyncio.run(main())"
306
309
msgstr ""
310
+ "import asyncio\n"
311
+ "\n"
312
+ "async def test():\n"
313
+ " print(\" never scheduled\" )\n"
314
+ "\n"
315
+ "async def main():\n"
316
+ " test()\n"
317
+ "\n"
318
+ "asyncio.run(main())"
307
319
308
320
#: ../../library/asyncio-dev.rst:176 ../../library/asyncio-dev.rst:221
309
321
msgid "Output::"
@@ -314,6 +326,8 @@ msgid ""
314
326
"test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
315
327
" test()"
316
328
msgstr ""
329
+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
330
+ " test()"
317
331
318
332
#: ../../library/asyncio-dev.rst:181 ../../library/asyncio-dev.rst:237
319
333
msgid "Output in debug mode::"
@@ -332,6 +346,16 @@ msgid ""
332
346
" test()\n"
333
347
" test()"
334
348
msgstr ""
349
+ "test.py:7: RuntimeWarning: coroutine 'test' was never awaited\n"
350
+ "Coroutine created at (most recent call last)\n"
351
+ " File \" ../t.py\" , line 9, in <module>\n"
352
+ " asyncio.run(main(), debug=True)\n"
353
+ "\n"
354
+ " < .. >\n"
355
+ "\n"
356
+ " File \" ../t.py\" , line 7, in main\n"
357
+ " test()\n"
358
+ " test()"
335
359
336
360
#: ../../library/asyncio-dev.rst:194
337
361
msgid ""
@@ -344,6 +368,8 @@ msgid ""
344
368
"async def main():\n"
345
369
" await test()"
346
370
msgstr ""
371
+ "async def main():\n"
372
+ " await test()"
347
373
348
374
#: ../../library/asyncio-dev.rst:202
349
375
msgid "Detect never-retrieved exceptions"
@@ -375,6 +401,15 @@ msgid ""
375
401
"\n"
376
402
"asyncio.run(main())"
377
403
msgstr ""
404
+ "import asyncio\n"
405
+ "\n"
406
+ "async def bug():\n"
407
+ " raise Exception(\" not consumed\" )\n"
408
+ "\n"
409
+ "async def main():\n"
410
+ " asyncio.create_task(bug())\n"
411
+ "\n"
412
+ "asyncio.run(main())"
378
413
379
414
#: ../../library/asyncio-dev.rst:223
380
415
msgid ""
@@ -387,6 +422,14 @@ msgid ""
387
422
" raise Exception(\" not consumed\" )\n"
388
423
"Exception: not consumed"
389
424
msgstr ""
425
+ "Task exception was never retrieved\n"
426
+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
427
+ " exception=Exception('not consumed')>\n"
428
+ "\n"
429
+ "Traceback (most recent call last):\n"
430
+ " File \" test.py\" , line 4, in bug\n"
431
+ " raise Exception(\" not consumed\" )\n"
432
+ "Exception: not consumed"
390
433
391
434
#: ../../library/asyncio-dev.rst:232
392
435
msgid ""
@@ -396,7 +439,7 @@ msgstr "태스크가 만들어진 곳의 트레이스백을 얻으려면 :ref:`
396
439
397
440
#: ../../library/asyncio-dev.rst:235
398
441
msgid "asyncio.run(main(), debug=True)"
399
- msgstr ""
442
+ msgstr "asyncio.run(main(), debug=True) "
400
443
401
444
#: ../../library/asyncio-dev.rst:239
402
445
msgid ""
@@ -415,4 +458,18 @@ msgid ""
415
458
" raise Exception(\" not consumed\" )\n"
416
459
"Exception: not consumed"
417
460
msgstr ""
461
+ "Task exception was never retrieved\n"
462
+ "future: <Task finished coro=<bug() done, defined at test.py:3>\n"
463
+ " exception=Exception('not consumed') created at asyncio/tasks.py:321>\n"
464
+ "\n"
465
+ "source_traceback: Object created at (most recent call last):\n"
466
+ " File \" ../t.py\" , line 9, in <module>\n"
467
+ " asyncio.run(main(), debug=True)\n"
468
+ "\n"
469
+ "< .. >\n"
470
+ "\n"
471
+ "Traceback (most recent call last):\n"
472
+ " File \" ../t.py\" , line 4, in bug\n"
473
+ " raise Exception(\" not consumed\" )\n"
474
+ "Exception: not consumed"
418
475
0 commit comments