@@ -132,15 +132,14 @@ msgid ""
132
132
msgstr "Future는 비동기 연산의 최종 결과를 나타냅니다. 스레드 안전하지 않습니다."
133
133
134
134
#: ../../library/asyncio-future.rst:86
135
- #, fuzzy
136
135
msgid ""
137
136
"Future is an :term:`awaitable` object. Coroutines can await on Future "
138
137
"objects until they either have a result or an exception set, or until "
139
138
"they are cancelled. A Future can be awaited multiple times and the result"
140
139
" is same."
141
140
msgstr ""
142
141
"Future는 :term:`어웨이터블 <awaitable>` 객체입니다. 코루틴은 결과나 예외가 설정되거나 취소될 때까지 "
143
- "Future 객체를 기다릴 수 있습니다."
142
+ "Future 객체를 기다릴 수 있습니다. Future는 여러번 어웨이트할 수 있으며 결과는 같습니다. "
144
143
145
144
#: ../../library/asyncio-future.rst:91
146
145
msgid ""
@@ -198,7 +197,6 @@ msgid ""
198
197
msgstr "Future가 *취소(cancelled)*\\ 되었으면, 이 메서드는 :exc:`CancelledError` 예외를 발생시킵니다."
199
198
200
199
#: ../../library/asyncio-future.rst:122
201
- #, fuzzy
202
200
msgid ""
203
201
"If the Future's result isn't yet available, this method raises an "
204
202
":exc:`InvalidStateError` exception."
@@ -209,7 +207,6 @@ msgid "Mark the Future as *done* and set its result."
209
207
msgstr "Future를 *완료(done)*\\ 로 표시하고, 그 결과를 설정합니다."
210
208
211
209
#: ../../library/asyncio-future.rst:129 ../../library/asyncio-future.rst:136
212
- #, fuzzy
213
210
msgid "Raises an :exc:`InvalidStateError` error if the Future is already *done*."
214
211
msgstr "Future가 이미 *완료(done)*\\ 했으면, :exc:`InvalidStateError` 에러를 발생시킵니다."
215
212
@@ -244,6 +241,8 @@ msgid ""
244
241
"if not fut.cancelled():\n"
245
242
" fut.set_result(42)"
246
243
msgstr ""
244
+ "if not fut.cancelled():\n"
245
+ " fut.set_result(42)"
247
246
248
247
#: ../../library/asyncio-future.rst:159
249
248
msgid "Add a callback to be run when the Future is *done*."
@@ -283,6 +282,9 @@ msgid ""
283
282
"fut.add_done_callback(\n"
284
283
" functools.partial(print, \" Future:\" ))"
285
284
msgstr ""
285
+ "# \" fut\" 가 완료되면 'print(\" Future:\" , fut)'를 호출합니다.\n"
286
+ "fut.add_done_callback(\n"
287
+ " functools.partial(print, \" Future:\" ))"
286
288
287
289
#: ../../library/asyncio-future.rst:178
288
290
msgid ""
@@ -314,9 +316,8 @@ msgstr ""
314
316
" 않으면 Future의 상태를 *취소(cancelled)*\\ 로 변경하고, 콜백을 예약한 다음 ``True``\\ 를 반환합니다."
315
317
316
318
#: ../../library/asyncio-future.rst:197
317
- #, fuzzy
318
319
msgid "Added the *msg* parameter."
319
- msgstr "`` msg`` 매개 변수를 추가했습니다."
320
+ msgstr "* msg* 매개 변수를 추가했습니다."
320
321
321
322
#: ../../library/asyncio-future.rst:202
322
323
msgid "Return the exception that was set on this Future."
@@ -379,6 +380,33 @@ msgid ""
379
380
"\n"
380
381
"asyncio.run(main())"
381
382
msgstr ""
383
+ "async def set_after(fut, delay, value):\n"
384
+ " # *delay* 초 동안 잠잡니다.\n"
385
+ " await asyncio.sleep(delay)\n"
386
+ "\n"
387
+ " # *fut* 퓨처의 결과로 *value* 를 설정합니다.\n"
388
+ " fut.set_result(value)\n"
389
+ "\n"
390
+ "async def main():\n"
391
+ " # 현재 이벤트 루프를 얻습니다.\n"
392
+ " loop = asyncio.get_running_loop()\n"
393
+ "\n"
394
+ " # 새로운 Future 객체를 만듭니다.\n"
395
+ " fut = loop.create_future()\n"
396
+ "\n"
397
+ " # 병렬 태스크로 \" set_after()\" 코루틴을 실행합니다.\n"
398
+ " # 이벤트 루프에 대한 참조를 이미 가지고 있으므로, 여기서는 저수준 \" loop.create_task()\" \n"
399
+ " # API를 사용하고 있습니다.\n"
400
+ " # 그렇지 않다면 그저 \" asyncio.create_task()\" 를 사용할 수 있었습니다.\n"
401
+ " loop.create_task(\n"
402
+ " set_after(fut, 1, '... world'))\n"
403
+ "\n"
404
+ " print('hello ...')\n"
405
+ "\n"
406
+ " # *fut* 에 결과가 올 때까지 기다렸다가 (1초) 그것을 인쇄합니다.\n"
407
+ " print(await fut)\n"
408
+ "\n"
409
+ "asyncio.run(main())"
382
410
383
411
#: ../../library/asyncio-future.rst:257
384
412
msgid ""
@@ -428,11 +456,10 @@ msgstr ""
428
456
":func:`concurrent.futures.as_completed` 함수와 호환되지 않습니다."
429
457
430
458
#: ../../library/asyncio-future.rst:278
431
- #, fuzzy
432
459
msgid ""
433
460
":meth:`asyncio.Future.cancel` accepts an optional ``msg`` argument, but "
434
461
":meth:`concurrent.futures.Future.cancel` does not."
435
462
msgstr ""
436
463
":meth:`asyncio.Future.cancel`\\ 은 선택적 ``msg`` 인자를 받아들이지만, "
437
- ":func :`concurrent.futures.cancel`\\ 은 받아들이지 않습니다."
464
+ ":meth :`concurrent.futures.Future .cancel`\\ 은 받아들이지 않습니다."
438
465
0 commit comments