Skip to content

Commit 1c09390

Browse files
committed
#988 - remove fuzzy flags
1 parent b43fbff commit 1c09390

File tree

1 file changed

+60
-11
lines changed

1 file changed

+60
-11
lines changed

library/asyncio-queue.po

Lines changed: 60 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,8 @@ msgstr ""
7171
"메서드를 호출하여 얻을 수 있습니다."
7272

7373
#: ../../library/asyncio-queue.rst:39
74-
#, fuzzy
7574
msgid "Removed the *loop* parameter."
76-
msgstr "*loop* 매개 변수"
75+
msgstr "*loop* 매개 변수를 제거했습니다."
7776

7877
#: ../../library/asyncio-queue.rst:43
7978
msgid "This class is :ref:`not thread safe <asyncio-multithreading>`."
@@ -92,12 +91,11 @@ msgid "Return ``True`` if there are :attr:`maxsize` items in the queue."
9291
msgstr "큐에 :attr:`maxsize` 항목이 있으면 ``True``\\를 반환합니다."
9392

9493
#: ../../library/asyncio-queue.rst:57
95-
#, fuzzy
9694
msgid ""
9795
"If the queue was initialized with ``maxsize=0`` (the default), then "
9896
":meth:`full` never returns ``True``."
9997
msgstr ""
100-
"큐가 ``maxsize=0`` (기본값)으로 초기화되었으면, :meth:`full()`\\은 절대 ``True``\\를 반환하지 "
98+
"큐가 ``maxsize=0`` (기본값)으로 초기화되었으면, :meth:`full`\\은 절대 ``True``\\를 반환하지 "
10199
"않습니다."
102100

103101
#: ../../library/asyncio-queue.rst:63
@@ -178,19 +176,17 @@ msgid ""
178176
msgstr ""
179177

180178
#: ../../library/asyncio-queue.rst:121
181-
#, fuzzy
182179
msgid "Indicate that a formerly enqueued work item is complete."
183-
msgstr "이전에 큐에 넣은 작업이 완료되었음을 나타냅니다."
180+
msgstr "이전에 큐에 넣은 작업 항목이 완료되었음을 나타냅니다."
184181

185182
#: ../../library/asyncio-queue.rst:123
186-
#, fuzzy
187183
msgid ""
188184
"Used by queue consumers. For each :meth:`~Queue.get` used to fetch a work"
189185
" item, a subsequent call to :meth:`task_done` tells the queue that the "
190186
"processing on the work item is complete."
191187
msgstr ""
192-
"큐 소비자가 사용합니다. 작업을 꺼내는 데 사용된 :meth:`~Queue.get` 마다, 뒤따르는 :meth:`task_done`"
193-
" 호출은 작업에 관한 처리가 완료되었음을 큐에 알려줍니다."
188+
"큐 소비자가 사용합니다. 작업 항목을 꺼내는 데 사용된 :meth:`~Queue.get` 마다, 뒤따르는 "
189+
":meth:`task_done` 호출은 작업 항목에 관한 처리가 완료되었음을 큐에 알려줍니다."
194190

195191
#: ../../library/asyncio-queue.rst:127
196192
msgid ""
@@ -254,11 +250,10 @@ msgid ""
254250
msgstr ":meth:`~Queue.put_nowait` 메서드가 *maxsize*\\에 도달한 큐에 호출될 때 발생하는 예외입니다."
255251

256252
#: ../../library/asyncio-queue.rst:177
257-
#, fuzzy
258253
msgid ""
259254
"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called "
260255
"on a queue which has been shut down."
261-
msgstr ":meth:`~Queue.put_nowait` 메서드가 *maxsize*\\에 도달한 큐에 호출될 때 발생하는 예외입니다."
256+
msgstr ":meth:`~Queue.put` 이나 :meth:`~Queue.get` 메서드가 종료된 큐에 호출될 때 발생하는 예외입니다."
262257

263258
#: ../../library/asyncio-queue.rst:184
264259
msgid "Examples"
@@ -328,4 +323,58 @@ msgid ""
328323
"\n"
329324
"asyncio.run(main())"
330325
msgstr ""
326+
"import asyncio\n"
327+
"import random\n"
328+
"import time\n"
329+
"\n"
330+
"\n"
331+
"async def worker(name, queue):\n"
332+
" while True:\n"
333+
" # 큐에서 \"작업 항목\"을 가져옵니다.\n"
334+
" sleep_for = await queue.get()\n"
335+
"\n"
336+
" # \"sleep_for\" 초 동안 잡니다.\n"
337+
" await asyncio.sleep(sleep_for)\n"
338+
"\n"
339+
" # 큐에 \"작업 항목\"이 처리되었음을 알립니다.\n"
340+
" queue.task_done()\n"
341+
"\n"
342+
" print(f'{name} has slept for {sleep_for:.2f} seconds')\n"
343+
"\n"
344+
"\n"
345+
"async def main():\n"
346+
" # \"작업 부하\"를 저장하는 데 사용할 큐를 만듭니다.\n"
347+
" queue = asyncio.Queue()\n"
348+
"\n"
349+
" # 무작위 대기 시간을 만들어서 큐에 넣습니다.\n"
350+
" total_sleep_time = 0\n"
351+
" for _ in range(20):\n"
352+
" sleep_for = random.uniform(0.05, 1.0)\n"
353+
" total_sleep_time += sleep_for\n"
354+
" queue.put_nowait(sleep_for)\n"
355+
"\n"
356+
" # 큐를 동시에 처리할 세 개의 worker 태스크를 만듭니다.\n"
357+
" tasks = []\n"
358+
" for i in range(3):\n"
359+
" task = asyncio.create_task(worker(f'worker-{i}', queue))\n"
360+
" tasks.append(task)\n"
361+
"\n"
362+
" # 큐가 완전히 처리될 때까지 기다립니다.\n"
363+
" started_at = time.monotonic()\n"
364+
" await queue.join()\n"
365+
" total_slept_for = time.monotonic() - started_at\n"
366+
"\n"
367+
" # worker 태스크를 취소합니다.\n"
368+
" for task in tasks:\n"
369+
" task.cancel()\n"
370+
" # 모든 worker 태스크가 취소될 때까지 기다립니다.\n"
371+
" await asyncio.gather(*tasks, return_exceptions=True)\n"
372+
"\n"
373+
" print('====')\n"
374+
" print(f'3 workers slept in parallel for {total_slept_for:.2f} "
375+
"seconds')\n"
376+
" print(f'total expected sleep time: {total_sleep_time:.2f} seconds')\n"
377+
"\n"
378+
"\n"
379+
"asyncio.run(main())"
331380

0 commit comments

Comments
 (0)