@@ -17,9 +17,8 @@ msgstr ""
17
17
"Generated-By : Babel 2.17.0\n "
18
18
19
19
#: ../../library/queue.rst:2
20
- #, fuzzy
21
20
msgid ":mod:`!queue` --- A synchronized queue class"
22
- msgstr ":mod:`queue` --- 동기화된 큐 클래스"
21
+ msgstr ":mod:`! queue` --- 동기화된 큐 클래스"
23
22
24
23
#: ../../library/queue.rst:7
25
24
msgid "**Source code:** :source:`Lib/queue.py`"
@@ -36,7 +35,6 @@ msgstr ""
36
35
"스레드 프로그래밍에서 특히 유용합니다. 이 모듈의 :class:`Queue` 클래스는 필요한 모든 로킹 개념을 구현합니다."
37
36
38
37
#: ../../library/queue.rst:16
39
- #, fuzzy
40
38
msgid ""
41
39
"The module implements three types of queue, which differ only in the "
42
40
"order in which the entries are retrieved. In a :abbr:`FIFO (first-in, "
@@ -111,14 +109,13 @@ msgstr ""
111
109
"도달하면, 큐 항목이 소비될 때까지 삽입이 블록 됩니다. *maxsize*\\ 가 0보다 작거나 같으면, 큐 크기는 무한합니다."
112
110
113
111
#: ../../library/queue.rst:59
114
- #, fuzzy
115
112
msgid ""
116
113
"The lowest valued entries are retrieved first (the lowest valued entry is"
117
114
" the one that would be returned by ``min(entries)``). A typical pattern "
118
115
"for entries is a tuple in the form: ``(priority_number, data)``."
119
116
msgstr ""
120
- "가장 낮은 값을 갖는 항목이 먼저 꺼내집니다 (가장 낮은 값을 갖는 항목은 ``sorted(list( entries))[0] `` 에 "
121
- "의해 반환되는 항목입니다). 항목의 전형적인 패턴은 ``(priority_number, data)`` 형식의 튜플입니다."
117
+ "가장 낮은 값을 갖는 항목이 먼저 꺼내집니다 (가장 낮은 값을 갖는 항목은 ``min( entries)`` 에 의해 반환될 "
118
+ "항목입니다). 항목의 전형적인 패턴은 ``(priority_number, data)`` 형식의 튜플입니다."
122
119
123
120
#: ../../library/queue.rst:63
124
121
msgid ""
@@ -136,6 +133,13 @@ msgid ""
136
133
" priority: int\n"
137
134
" item: Any=field(compare=False)"
138
135
msgstr ""
136
+ "from dataclasses import dataclass, field\n"
137
+ "from typing import Any\n"
138
+ "\n"
139
+ "@dataclass(order=True)\n"
140
+ "class PrioritizedItem:\n"
141
+ " priority: int\n"
142
+ " item: Any=field(compare=False)"
139
143
140
144
#: ../../library/queue.rst:76
141
145
msgid ""
@@ -164,13 +168,12 @@ msgstr ""
164
168
":class:`Queue` 객체에 호출될 때 발생하는 예외."
165
169
166
170
#: ../../library/queue.rst:98
167
- #, fuzzy
168
171
msgid ""
169
172
"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called "
170
173
"on a :class:`Queue` object which has been shut down."
171
174
msgstr ""
172
- "비 블로킹 :meth:`~Queue.get `\\ (또는 :meth:`~Queue.get_nowait `)이 비어있는 "
173
- ":class:`Queue` 객체에 호출될 때 발생하는 예외."
175
+ ":meth:`~Queue.put `\\ (또는 :meth:`~Queue.put `)이 종료된 :class:`Queue` 객체에 호출될 때 "
176
+ " 발생하는 예외."
174
177
175
178
#: ../../library/queue.rst:107
176
179
msgid "Queue Objects"
@@ -216,7 +219,6 @@ msgstr ""
216
219
"``False``\\ 를 반환하면, put()에 대한 후속 호출이 블록 되지 않는다고 보장하는 것은 아닙니다."
217
220
218
221
#: ../../library/queue.rst:138
219
- #, fuzzy
220
222
msgid ""
221
223
"Put *item* into the queue. If optional args *block* is true and "
222
224
"*timeout* is ``None`` (the default), block if necessary until a free slot"
@@ -237,9 +239,8 @@ msgid "Raises :exc:`ShutDown` if the queue has been shut down."
237
239
msgstr ""
238
240
239
241
#: ../../library/queue.rst:151
240
- #, fuzzy
241
242
msgid "Equivalent to ``put(item, block=False)``."
242
- msgstr "``put(item, False)``\\ 와 동등합니다."
243
+ msgstr "``put(item, block= False)``\\ 와 동등합니다."
243
244
244
245
#: ../../library/queue.rst:156 ../../library/queue.rst:297
245
246
msgid ""
@@ -258,7 +259,6 @@ msgstr ""
258
259
"무시됩니다)."
259
260
260
261
#: ../../library/queue.rst:163
261
- #, fuzzy
262
262
msgid ""
263
263
"Prior to 3.0 on POSIX systems, and for all versions on Windows, if "
264
264
"*block* is true and *timeout* is ``None``, this operation goes into an "
@@ -322,7 +322,6 @@ msgid "Blocks until all items in the queue have been gotten and processed."
322
322
msgstr "큐의 모든 항목을 꺼내서 처리할 때까지 블록합니다."
323
323
324
324
#: ../../library/queue.rst:201
325
- #, fuzzy
326
325
msgid ""
327
326
"The count of unfinished tasks goes up whenever an item is added to the "
328
327
"queue. The count goes down whenever a consumer thread calls "
@@ -364,6 +363,28 @@ msgid ""
364
363
"q.join()\n"
365
364
"print('All work completed')"
366
365
msgstr ""
366
+ "import threading\n"
367
+ "import queue\n"
368
+ "\n"
369
+ "q = queue.Queue()\n"
370
+ "\n"
371
+ "def worker():\n"
372
+ " while True:\n"
373
+ " item = q.get()\n"
374
+ " print(f'Working on {item}')\n"
375
+ " print(f'Finished {item}')\n"
376
+ " q.task_done()\n"
377
+ "\n"
378
+ "# 작업자 스레드를 켭니다.\n"
379
+ "threading.Thread(target=worker, daemon=True).start()\n"
380
+ "\n"
381
+ "# 작업자에게 30개의 작업 요청을 보냅니다.\n"
382
+ "for item in range(30):\n"
383
+ " q.put(item)\n"
384
+ "\n"
385
+ "# 모든 작업이 완료될 때까지 블록합니다.\n"
386
+ "q.join()\n"
387
+ "print('All work completed')"
367
388
368
389
#: ../../library/queue.rst:234
369
390
msgid "Terminating queues"
@@ -413,7 +434,6 @@ msgstr ""
413
434
"않습니다."
414
435
415
436
#: ../../library/queue.rst:269
416
- #, fuzzy
417
437
msgid ""
418
438
"Return ``True`` if the queue is empty, ``False`` otherwise. If empty() "
419
439
"returns ``False`` it doesn't guarantee that a subsequent call to get() "
@@ -443,11 +463,12 @@ msgid ""
443
463
msgstr ""
444
464
445
465
#: ../../library/queue.rst:291
446
- #, fuzzy
447
466
msgid ""
448
467
"Equivalent to ``put(item, block=False)``, provided for compatibility with"
449
468
" :meth:`Queue.put_nowait`."
450
- msgstr "``put(item)``\\ 과 동등합니다, :meth:`Queue.put_nowait`\\ 와의 호환성을 위해 제공됩니다."
469
+ msgstr ""
470
+ "``put(item, block=False)``\\ 과 동등합니다, :meth:`Queue.put_nowait`\\ 와의 호환성을 위해"
471
+ " 제공됩니다."
451
472
452
473
#: ../../library/queue.rst:312
453
474
msgid "Class :class:`multiprocessing.Queue`"
@@ -470,29 +491,3 @@ msgstr ""
470
491
":meth:`~collections.deque.append`\\ 와 :meth:`~collections.deque.popleft` "
471
492
"연산을 제공하는 크기 제한 없는 큐의 대체 구현입니다."
472
493
473
- #~ msgid ""
474
- #~ "Remove and return an item from the"
475
- #~ " queue. If optional args *block* is"
476
- #~ " true and *timeout* is ``None`` (the"
477
- #~ " default), block if necessary until "
478
- #~ "an item is available. If *timeout* "
479
- #~ "is a positive number, it blocks at"
480
- #~ " most *timeout* seconds and raises "
481
- #~ "the :exc:`Empty` exception if no item"
482
- #~ " was available within that time. "
483
- #~ "Otherwise (*block* is false), return an"
484
- #~ " item if one is immediately "
485
- #~ "available, else raise the :exc:`Empty` "
486
- #~ "exception (*timeout* is ignored in that"
487
- #~ " case)."
488
- #~ msgstr ""
489
- #~ "큐에서 항목을 제거하고 반환합니다. 선택적 인자 "
490
- #~ "*block*\\이 참이고 *timeout*\\이 ``None``\\(기본값)이면, "
491
- #~ "항목이 사용 가능할 때까지 필요하면 블록합니다. "
492
- #~ "*timeout*\\이 양수면, 최대 *timeout* 초 동안 "
493
- #~ "블록하고 그 시간 내에 사용 가능한 항목이 없으면"
494
- #~ " :exc:`Empty` 예외가 발생합니다. 그렇지 않으면 "
495
- #~ "(*block*\\이 거짓), 즉시 사용할 수 있는 항목이"
496
- #~ " 있으면 반환하고, 그렇지 않으면 :exc:`Empty` 예외를"
497
- #~ " 발생시킵니다 (이때 *timeout*\\은 무시됩니다)."
498
-
0 commit comments