-
-
Notifications
You must be signed in to change notification settings - Fork 53
Expand file tree
/
Copy pathasyncio-sync.po
More file actions
747 lines (646 loc) · 25.9 KB
/
asyncio-sync.po
File metadata and controls
747 lines (646 loc) · 25.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2017, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, 2017.
#
msgid ""
msgstr ""
"Project-Id-Version: Python 3.6\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-10-11 20:40+0000\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: Dong-gweon Oh <flowdas@gmail.com>\n"
"Language-Team: Korean (https://python.flowdas.com)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Generated-By: Babel 2.17.0\n"
#: ../../library/asyncio-sync.rst:7
msgid "Synchronization Primitives"
msgstr "동기화 프리미티브"
#: ../../library/asyncio-sync.rst:9
msgid "**Source code:** :source:`Lib/asyncio/locks.py`"
msgstr "**소스 코드:** :source:`Lib/asyncio/locks.py`"
#: ../../library/asyncio-sync.rst:13
msgid ""
"asyncio synchronization primitives are designed to be similar to those of"
" the :mod:`threading` module with two important caveats:"
msgstr ""
"asyncio 동기화 프리미티브는 :mod:`threading` 모듈의 것과 유사하도록 설계되었습니다만 두 가지 중요한 주의 사항이"
" 있습니다:"
#: ../../library/asyncio-sync.rst:16
msgid ""
"asyncio primitives are not thread-safe, therefore they should not be used"
" for OS thread synchronization (use :mod:`threading` for that);"
msgstr ""
"asyncio 프리미티브는 스레드 안전하지 않으므로, OS 스레드 동기화(이를 위해서는 :mod:`threading`\\을 "
"사용하십시오)에 사용하면 안 됩니다."
#: ../../library/asyncio-sync.rst:20
msgid ""
"methods of these synchronization primitives do not accept the *timeout* "
"argument; use the :func:`asyncio.wait_for` function to perform operations"
" with timeouts."
msgstr ""
"이러한 동기화 프리미티브의 메서드는 *timeout* 인자를 받아들이지 않습니다; :func:`asyncio.wait_for` "
"함수를 사용하여 시간제한이 있는 연산을 수행하십시오."
#: ../../library/asyncio-sync.rst:24
msgid "asyncio has the following basic synchronization primitives:"
msgstr "asyncio에는 다음과 같은 기본 동기화 프리미티브가 있습니다:"
#: ../../library/asyncio-sync.rst:26
msgid ":class:`Lock`"
msgstr ":class:`Lock`"
#: ../../library/asyncio-sync.rst:27
msgid ":class:`Event`"
msgstr ":class:`Event`"
#: ../../library/asyncio-sync.rst:28
msgid ":class:`Condition`"
msgstr ":class:`Condition`"
#: ../../library/asyncio-sync.rst:29
msgid ":class:`Semaphore`"
msgstr ":class:`Semaphore`"
#: ../../library/asyncio-sync.rst:30
msgid ":class:`BoundedSemaphore`"
msgstr ":class:`BoundedSemaphore`"
#: ../../library/asyncio-sync.rst:31
msgid ":class:`Barrier`"
msgstr ":class:`Barrier`"
#: ../../library/asyncio-sync.rst:38
msgid "Lock"
msgstr "Lock"
#: ../../library/asyncio-sync.rst:42
msgid "Implements a mutex lock for asyncio tasks. Not thread-safe."
msgstr "asyncio 태스크를 위한 뮤텍스 록을 구현합니다. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:44
msgid ""
"An asyncio lock can be used to guarantee exclusive access to a shared "
"resource."
msgstr "asyncio 록은 공유 자원에 대한 독점 액세스를 보장하는 데 사용될 수 있습니다."
#: ../../library/asyncio-sync.rst:47
msgid "The preferred way to use a Lock is an :keyword:`async with` statement::"
msgstr "Lock을 사용하는 가장 좋은 방법은 :keyword:`async with` 문입니다::"
#: ../../library/asyncio-sync.rst:50
msgid ""
"lock = asyncio.Lock()\n"
"\n"
"# ... later\n"
"async with lock:\n"
" # access shared state"
msgstr ""
"lock = asyncio.Lock()\n"
"\n"
"# ... 나중에\n"
"async with lock:\n"
" # 공유 상태를 액세스합니다"
#: ../../library/asyncio-sync.rst:56 ../../library/asyncio-sync.rst:201
#: ../../library/asyncio-sync.rst:309
msgid "which is equivalent to::"
msgstr "이는 다음과 동등합니다::"
#: ../../library/asyncio-sync.rst:58
msgid ""
"lock = asyncio.Lock()\n"
"\n"
"# ... later\n"
"await lock.acquire()\n"
"try:\n"
" # access shared state\n"
"finally:\n"
" lock.release()"
msgstr ""
"lock = asyncio.Lock()\n"
"\n"
"# ... 나중에\n"
"await lock.acquire()\n"
"try:\n"
" # 공유 상태를 액세스합니다\n"
"finally:\n"
" lock.release()"
#: ../../library/asyncio-sync.rst:67 ../../library/asyncio-sync.rst:113
#: ../../library/asyncio-sync.rst:189 ../../library/asyncio-sync.rst:297
#: ../../library/asyncio-sync.rst:353
msgid "Removed the *loop* parameter."
msgstr "*loop* 매개 변수를 제거했습니다."
#: ../../library/asyncio-sync.rst:73
msgid "Acquire the lock."
msgstr "록을 얻습니다."
#: ../../library/asyncio-sync.rst:75
msgid ""
"This method waits until the lock is *unlocked*, sets it to *locked* and "
"returns ``True``."
msgstr ""
"이 메서드는 록이 *풀림(unlocked)*\\이 될 때까지 기다리고, *잠김(locked)*\\으로 설정한 다음 "
"``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:78
msgid ""
"When more than one coroutine is blocked in :meth:`acquire` waiting for "
"the lock to be unlocked, only one coroutine eventually proceeds."
msgstr "잠금이 해제되기를 기다리는 :meth:`acquire`\\에서 둘 이상의 코루틴 블록 될 때, 결국 한 개의 코루틴만 진행됩니다."
#: ../../library/asyncio-sync.rst:82
msgid ""
"Acquiring a lock is *fair*: the coroutine that proceeds will be the first"
" coroutine that started waiting on the lock."
msgstr "록을 얻는 것은 *공평(fair)*\\합니다: 진행할 코루틴은 록을 기다리기 시작한 첫 번째 코루틴이 됩니다."
#: ../../library/asyncio-sync.rst:87
msgid "Release the lock."
msgstr "록을 반납합니다."
#: ../../library/asyncio-sync.rst:89
msgid "When the lock is *locked*, reset it to *unlocked* and return."
msgstr "록이 *잠김(locked)*\\이면 *풀림(unlocked)*\\으로 재설정하고 돌아옵니다."
#: ../../library/asyncio-sync.rst:91
msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised."
msgstr "록이 *풀림(unlocked)*\\이면 :exc:`RuntimeError`\\가 발생합니다."
#: ../../library/asyncio-sync.rst:95
msgid "Return ``True`` if the lock is *locked*."
msgstr "록이 *잠김(locked)*\\이면 ``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:99
msgid "Event"
msgstr "Event"
#: ../../library/asyncio-sync.rst:103
msgid "An event object. Not thread-safe."
msgstr "이벤트 객체. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:105
msgid ""
"An asyncio event can be used to notify multiple asyncio tasks that some "
"event has happened."
msgstr "asyncio 이벤트는 어떤 이벤트가 발생했음을 여러 asyncio 태스크에 알리는 데 사용할 수 있습니다."
#: ../../library/asyncio-sync.rst:108
msgid ""
"An Event object manages an internal flag that can be set to *true* with "
"the :meth:`~Event.set` method and reset to *false* with the :meth:`clear`"
" method. The :meth:`~Event.wait` method blocks until the flag is set to "
"*true*. The flag is set to *false* initially."
msgstr ""
"Event 객체는 :meth:`~Event.set` 메서드로 *참*\\으로 설정하고 :meth:`clear` 메서드로 "
"*거짓*\\으로 재설정할 수 있는 내부 플래그를 관리합니다. :meth:`~Event.wait` 메서드는 플래그가 *참*\\으로 "
"설정될 때까지 블록합니다. 플래그는 초기에 *거짓*\\으로 설정됩니다."
#: ../../library/asyncio-sync.rst:118 ../../library/asyncio-sync.rst:377
msgid "Example::"
msgstr "예::"
#: ../../library/asyncio-sync.rst:120
msgid ""
"async def waiter(event):\n"
" print('waiting for it ...')\n"
" await event.wait()\n"
" print('... got it!')\n"
"\n"
"async def main():\n"
" # Create an Event object.\n"
" event = asyncio.Event()\n"
"\n"
" # Spawn a Task to wait until 'event' is set.\n"
" waiter_task = asyncio.create_task(waiter(event))\n"
"\n"
" # Sleep for 1 second and set the event.\n"
" await asyncio.sleep(1)\n"
" event.set()\n"
"\n"
" # Wait until the waiter task is finished.\n"
" await waiter_task\n"
"\n"
"asyncio.run(main())"
msgstr ""
"async def waiter(event):\n"
" print('waiting for it ...')\n"
" await event.wait()\n"
" print('... got it!')\n"
"\n"
"async def main():\n"
" # Event 객체를 만듭니다.\n"
" event = asyncio.Event()\n"
"\n"
" # 'event'가 설정될 때까지 대기 할 Task를 만듭니다.\n"
" waiter_task = asyncio.create_task(waiter(event))\n"
"\n"
" # 1초 동안 잠잔 후에 event를 설정합니다.\n"
" await asyncio.sleep(1)\n"
" event.set()\n"
"\n"
" # waiter 태스크가 끝날 때까지 기다립니다.\n"
" await waiter_task\n"
"\n"
"asyncio.run(main())"
#: ../../library/asyncio-sync.rst:144
msgid "Wait until the event is set."
msgstr "이벤트가 설정될 때까지 기다립니다."
#: ../../library/asyncio-sync.rst:146
msgid ""
"If the event is set, return ``True`` immediately. Otherwise block until "
"another task calls :meth:`~Event.set`."
msgstr ""
"이벤트가 설정되었으면 ``True``\\를 즉시 반환합니다. 그렇지 않으면 다른 태스크가 :meth:`~Event.set`\\을 "
"호출할 때까지 블록합니다."
#: ../../library/asyncio-sync.rst:151
msgid "Set the event."
msgstr "이벤트를 설정합니다."
#: ../../library/asyncio-sync.rst:153
msgid "All tasks waiting for event to be set will be immediately awakened."
msgstr "이벤트가 설정되기를 기다리는 모든 태스크는 즉시 깨어납니다."
#: ../../library/asyncio-sync.rst:158
msgid "Clear (unset) the event."
msgstr "이벤트를 지웁니다 (재설정)."
#: ../../library/asyncio-sync.rst:160
#, fuzzy
msgid ""
"Subsequent tasks awaiting on :meth:`~Event.wait` will now block until the"
" :meth:`~Event.set` method is called again."
msgstr ""
"이제 :meth:`~Event.wait`\\를 기다리는 태스크는 :meth:`~Event.set` 메서드가 다시 호출될 때까지 블록"
" 됩니다."
#: ../../library/asyncio-sync.rst:165
msgid "Return ``True`` if the event is set."
msgstr "이벤트가 설정되면 ``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:169
msgid "Condition"
msgstr "Condition"
#: ../../library/asyncio-sync.rst:173
msgid "A Condition object. Not thread-safe."
msgstr "Condition 객체. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:175
msgid ""
"An asyncio condition primitive can be used by a task to wait for some "
"event to happen and then get exclusive access to a shared resource."
msgstr ""
"asyncio 조건 프리미티브는 태스크가 어떤 이벤트가 발생하기를 기다린 다음 공유 자원에 독점적으로 액세스하는데 사용할 수 "
"있습니다."
#: ../../library/asyncio-sync.rst:179
msgid ""
"In essence, a Condition object combines the functionality of an "
":class:`Event` and a :class:`Lock`. It is possible to have multiple "
"Condition objects share one Lock, which allows coordinating exclusive "
"access to a shared resource between different tasks interested in "
"particular states of that shared resource."
msgstr ""
"본질에서, Condition 객체는 :class:`Event`\\와 :class:`Lock`\\의 기능을 결합합니다. 여러 개의 "
"Condition 객체가 하나의 Lock을 공유할 수 있으므로, 공유 자원의 특정 상태에 관심이 있는 다른 태스크 간에 공유 자원에"
" 대한 독점적 액세스를 조정할 수 있습니다."
#: ../../library/asyncio-sync.rst:185
msgid ""
"The optional *lock* argument must be a :class:`Lock` object or ``None``."
" In the latter case a new Lock object is created automatically."
msgstr ""
"선택적 *lock* 인자는 :class:`Lock` 객체나 ``None`` 이어야 합니다. 후자의 경우 새로운 Lock 객체가 "
"자동으로 만들어집니다."
#: ../../library/asyncio-sync.rst:192
msgid ""
"The preferred way to use a Condition is an :keyword:`async with` "
"statement::"
msgstr "Condition을 사용하는 가장 좋은 방법은 :keyword:`async with` 문입니다::"
#: ../../library/asyncio-sync.rst:195
msgid ""
"cond = asyncio.Condition()\n"
"\n"
"# ... later\n"
"async with cond:\n"
" await cond.wait()"
msgstr ""
"cond = asyncio.Condition()\n"
"\n"
"# ... 나중에\n"
"async with cond:\n"
" await cond.wait()"
#: ../../library/asyncio-sync.rst:203
msgid ""
"cond = asyncio.Condition()\n"
"\n"
"# ... later\n"
"await cond.acquire()\n"
"try:\n"
" await cond.wait()\n"
"finally:\n"
" cond.release()"
msgstr ""
"cond = asyncio.Condition()\n"
"\n"
"# ... 나중에\n"
"await cond.acquire()\n"
"try:\n"
" await cond.wait()\n"
"finally:\n"
" cond.release()"
#: ../../library/asyncio-sync.rst:215
msgid "Acquire the underlying lock."
msgstr "하부 록을 얻습니다."
#: ../../library/asyncio-sync.rst:217
msgid ""
"This method waits until the underlying lock is *unlocked*, sets it to "
"*locked* and returns ``True``."
msgstr ""
"이 메서드는 하부 록이 *풀림(unlocked)*\\이 될 때까지 대기하고, *잠김(locked)*\\으로 설정한 다음 "
"``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:222
msgid ""
"Wake up *n* tasks (1 by default) waiting on this condition. If fewer "
"than *n* tasks are waiting they are all awakened."
msgstr "이 조건을 기다리는 *n* 태스크(기본적으로 1개)를 깨웁니다. 대기 중인 태스크가 *n* 개 보다 작으면 모두 깨어납니다."
#: ../../library/asyncio-sync.rst:225 ../../library/asyncio-sync.rst:240
msgid ""
"The lock must be acquired before this method is called and released "
"shortly after. If called with an *unlocked* lock a :exc:`RuntimeError` "
"error is raised."
msgstr ""
"이 메서드를 호출하기 전에 록을 얻어야 하고, 호출 직후에 반납해야 합니다. *풀린(unlocked)* 록으로 호출하면 "
":exc:`RuntimeError` 에러가 발생합니다."
#: ../../library/asyncio-sync.rst:231
msgid "Return ``True`` if the underlying lock is acquired."
msgstr "하부 록을 얻었으면 ``True``\\를 돌려줍니다."
#: ../../library/asyncio-sync.rst:235
msgid "Wake up all tasks waiting on this condition."
msgstr "이 조건에 대기 중인 모든 태스크를 깨웁니다."
#: ../../library/asyncio-sync.rst:237
msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks."
msgstr "이 메서드는 :meth:`notify`\\처럼 작동하지만, 대기 중인 모든 태스크를 깨웁니다."
#: ../../library/asyncio-sync.rst:246
msgid "Release the underlying lock."
msgstr "하부 록을 반납합니다."
#: ../../library/asyncio-sync.rst:248
msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised."
msgstr "풀린 록으로 호출하면, :exc:`RuntimeError`\\가 발생합니다."
#: ../../library/asyncio-sync.rst:254
msgid "Wait until notified."
msgstr "알릴 때까지 기다립니다."
#: ../../library/asyncio-sync.rst:256
msgid ""
"If the calling task has not acquired the lock when this method is called,"
" a :exc:`RuntimeError` is raised."
msgstr "이 메서드가 호출될 때 호출하는 태스크가 록을 얻지 않았으면 :exc:`RuntimeError`\\가 발생합니다."
#: ../../library/asyncio-sync.rst:259
msgid ""
"This method releases the underlying lock, and then blocks until it is "
"awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, "
"the Condition re-acquires its lock and this method returns ``True``."
msgstr ""
"이 메서드는 하부 잠금을 반납한 다음, :meth:`notify` 나 :meth:`notify_all` 호출 때문에 깨어날 때까지 "
"블록합니다. 일단 깨어나면, Condition은 록을 다시 얻고, 이 메서드는 ``True``\\를 돌려줍니다."
#: ../../library/asyncio-sync.rst:264
msgid ""
"Note that a task *may* return from this call spuriously, which is why the"
" caller should always re-check the state and be prepared to "
":meth:`~Condition.wait` again. For this reason, you may prefer to use "
":meth:`~Condition.wait_for` instead."
msgstr ""
#: ../../library/asyncio-sync.rst:272
msgid "Wait until a predicate becomes *true*."
msgstr "predicate가 *참*\\이 될 때까지 기다립니다."
#: ../../library/asyncio-sync.rst:274
msgid ""
"The predicate must be a callable which result will be interpreted as a "
"boolean value. The method will repeatedly :meth:`~Condition.wait` until "
"the predicate evaluates to *true*. The final value is the return value."
msgstr ""
"predicate는 논릿값으로 해석될 결과를 돌려주는 콜러블이어야 합니다. 메서드는 predicate가 *참*\\으로 평가될 때까지"
" 반복적으로 :meth:`~Condition.wait`\\합니다. 최종값이 반환 값입니다."
#: ../../library/asyncio-sync.rst:281
msgid "Semaphore"
msgstr "Semaphore"
#: ../../library/asyncio-sync.rst:285
msgid "A Semaphore object. Not thread-safe."
msgstr "Semaphore 객체. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:287
msgid ""
"A semaphore manages an internal counter which is decremented by each "
":meth:`acquire` call and incremented by each :meth:`release` call. The "
"counter can never go below zero; when :meth:`acquire` finds that it is "
"zero, it blocks, waiting until some task calls :meth:`release`."
msgstr ""
"세마포어는 각 :meth:`acquire` 호출로 감소하고, 각 :meth:`release` 호출로 증가하는 내부 카운터를 "
"관리합니다. 카운터는 절대로 0 밑으로 내려갈 수 없습니다; :meth:`acquire`\\가 0을 만나면, "
":meth:`release`\\를 호출할 때까지 기다리면서 블록합니다."
#: ../../library/asyncio-sync.rst:293
msgid ""
"The optional *value* argument gives the initial value for the internal "
"counter (``1`` by default). If the given value is less than ``0`` a "
":exc:`ValueError` is raised."
msgstr ""
"선택적 *value* 인자는 내부 카운터의 초깃값을 제공합니다 (기본적으로 ``1``). 지정된 값이 ``0``\\보다 작으면 "
":exc:`ValueError`\\가 발생합니다."
#: ../../library/asyncio-sync.rst:300
msgid ""
"The preferred way to use a Semaphore is an :keyword:`async with` "
"statement::"
msgstr "Semaphore를 사용하는 가장 좋은 방법은 :keyword:`async with` 문입니다::"
#: ../../library/asyncio-sync.rst:303
msgid ""
"sem = asyncio.Semaphore(10)\n"
"\n"
"# ... later\n"
"async with sem:\n"
" # work with shared resource"
msgstr ""
"sem = asyncio.Semaphore(10)\n"
"\n"
"# ... 나중에\n"
"async with sem:\n"
" # 공유 자원으로 작업합니다"
#: ../../library/asyncio-sync.rst:311
msgid ""
"sem = asyncio.Semaphore(10)\n"
"\n"
"# ... later\n"
"await sem.acquire()\n"
"try:\n"
" # work with shared resource\n"
"finally:\n"
" sem.release()"
msgstr ""
"sem = asyncio.Semaphore(10)\n"
"\n"
"# ... 나중에\n"
"await sem.acquire()\n"
"try:\n"
" # 공유 자원으로 작업합니다\n"
"finally:\n"
" sem.release()"
#: ../../library/asyncio-sync.rst:323
msgid "Acquire a semaphore."
msgstr "세마포어를 얻습니다."
#: ../../library/asyncio-sync.rst:325
msgid ""
"If the internal counter is greater than zero, decrement it by one and "
"return ``True`` immediately. If it is zero, wait until a :meth:`release`"
" is called and return ``True``."
msgstr ""
"내부 카운터가 0보다 크면, 1 감소시키고 ``True``\\를 즉시 반환합니다. 0이면, :meth:`release`\\가 호출될"
" 때까지 기다린 다음 ``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:331
msgid "Returns ``True`` if semaphore can not be acquired immediately."
msgstr "세마포어를 즉시 얻을 수 없으면 ``True``\\를 반환합니다."
#: ../../library/asyncio-sync.rst:335
msgid ""
"Release a semaphore, incrementing the internal counter by one. Can wake "
"up a task waiting to acquire the semaphore."
msgstr "세마포어를 반납하고 내부 카운터를 1 증가시킵니다. 세마포어를 얻기 위해 대기하는 태스크를 깨울 수 있습니다."
#: ../../library/asyncio-sync.rst:338
msgid ""
"Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more "
"``release()`` calls than ``acquire()`` calls."
msgstr ""
":class:`BoundedSemaphore`\\와 달리, :class:`Semaphore`\\는 ``acquire()`` 호출보다"
" 더 많은 ``release()`` 호출을 허용합니다."
#: ../../library/asyncio-sync.rst:343
msgid "BoundedSemaphore"
msgstr "BoundedSemaphore"
#: ../../library/asyncio-sync.rst:347
msgid "A bounded semaphore object. Not thread-safe."
msgstr "제한된 세마포어 객체. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:349
msgid ""
"Bounded Semaphore is a version of :class:`Semaphore` that raises a "
":exc:`ValueError` in :meth:`~Semaphore.release` if it increases the "
"internal counter above the initial *value*."
msgstr ""
"제한된 세마포어는 초기 *value* 위로 내부 카운터를 증가시키면 :meth:`~Semaphore.release`\\에서 "
":exc:`ValueError`\\를 발생시키는 :class:`Semaphore` 버전입니다."
#: ../../library/asyncio-sync.rst:358
msgid "Barrier"
msgstr "Barrier"
#: ../../library/asyncio-sync.rst:362
msgid "A barrier object. Not thread-safe."
msgstr "장벽 객체. 스레드 안전하지 않습니다."
#: ../../library/asyncio-sync.rst:364
msgid ""
"A barrier is a simple synchronization primitive that allows to block "
"until *parties* number of tasks are waiting on it. Tasks can wait on the "
":meth:`~Barrier.wait` method and would be blocked until the specified "
"number of tasks end up waiting on :meth:`~Barrier.wait`. At that point "
"all of the waiting tasks would unblock simultaneously."
msgstr ""
#: ../../library/asyncio-sync.rst:370
msgid ""
":keyword:`async with` can be used as an alternative to awaiting on "
":meth:`~Barrier.wait`."
msgstr ""
#: ../../library/asyncio-sync.rst:373
msgid "The barrier can be reused any number of times."
msgstr ""
#: ../../library/asyncio-sync.rst:379
msgid ""
"async def example_barrier():\n"
" # barrier with 3 parties\n"
" b = asyncio.Barrier(3)\n"
"\n"
" # create 2 new waiting tasks\n"
" asyncio.create_task(b.wait())\n"
" asyncio.create_task(b.wait())\n"
"\n"
" await asyncio.sleep(0)\n"
" print(b)\n"
"\n"
" # The third .wait() call passes the barrier\n"
" await b.wait()\n"
" print(b)\n"
" print(\"barrier passed\")\n"
"\n"
" await asyncio.sleep(0)\n"
" print(b)\n"
"\n"
"asyncio.run(example_barrier())"
msgstr ""
"async def example_barrier():\n"
" # 3자 간 장벽\n"
" b = asyncio.Barrier(3)\n"
"\n"
" # 기다리는 태스크를 2개 만듭니다\n"
" asyncio.create_task(b.wait())\n"
" asyncio.create_task(b.wait())\n"
"\n"
" await asyncio.sleep(0)\n"
" print(b)\n"
"\n"
" # 세 번째 .wait() 호출은 장벽을 통과합니다\n"
" await b.wait()\n"
" print(b)\n"
" print(\"barrier passed\")\n"
"\n"
" await asyncio.sleep(0)\n"
" print(b)\n"
"\n"
"asyncio.run(example_barrier())"
#: ../../library/asyncio-sync.rst:400
msgid "Result of this example is::"
msgstr ""
#: ../../library/asyncio-sync.rst:402
msgid ""
"<asyncio.locks.Barrier object at 0x... [filling, waiters:2/3]>\n"
"<asyncio.locks.Barrier object at 0x... [draining, waiters:0/3]>\n"
"barrier passed\n"
"<asyncio.locks.Barrier object at 0x... [filling, waiters:0/3]>"
msgstr ""
"<asyncio.locks.Barrier object at 0x... [filling, waiters:2/3]>\n"
"<asyncio.locks.Barrier object at 0x... [draining, waiters:0/3]>\n"
"barrier passed\n"
"<asyncio.locks.Barrier object at 0x... [filling, waiters:0/3]>"
#: ../../library/asyncio-sync.rst:412
msgid ""
"Pass the barrier. When all the tasks party to the barrier have called "
"this function, they are all unblocked simultaneously."
msgstr ""
#: ../../library/asyncio-sync.rst:415
msgid ""
"When a waiting or blocked task in the barrier is cancelled, this task "
"exits the barrier which stays in the same state. If the state of the "
"barrier is \"filling\", the number of waiting task decreases by 1."
msgstr ""
#: ../../library/asyncio-sync.rst:420
msgid ""
"The return value is an integer in the range of 0 to ``parties-1``, "
"different for each task. This can be used to select a task to do some "
"special housekeeping, e.g.::"
msgstr ""
#: ../../library/asyncio-sync.rst:424
msgid ""
"...\n"
"async with barrier as position:\n"
" if position == 0:\n"
" # Only one task prints this\n"
" print('End of *draining phase*')"
msgstr ""
"...\n"
"async with barrier as position:\n"
" if position == 0:\n"
" # 오직 한 태스크만 이것을 인쇄합니다\n"
" print('End of *draining phase*')"
#: ../../library/asyncio-sync.rst:430
msgid ""
"This method may raise a :class:`BrokenBarrierError` exception if the "
"barrier is broken or reset while a task is waiting. It could raise a "
":exc:`CancelledError` if a task is cancelled."
msgstr ""
#: ../../library/asyncio-sync.rst:437
msgid ""
"Return the barrier to the default, empty state. Any tasks waiting on it "
"will receive the :class:`BrokenBarrierError` exception."
msgstr ""
#: ../../library/asyncio-sync.rst:440
msgid ""
"If a barrier is broken it may be better to just leave it and create a new"
" one."
msgstr ""
#: ../../library/asyncio-sync.rst:445
msgid ""
"Put the barrier into a broken state. This causes any active or future "
"calls to :meth:`~Barrier.wait` to fail with the "
":class:`BrokenBarrierError`. Use this for example if one of the tasks "
"needs to abort, to avoid infinite waiting tasks."
msgstr ""
#: ../../library/asyncio-sync.rst:452
msgid "The number of tasks required to pass the barrier."
msgstr ""
#: ../../library/asyncio-sync.rst:456
msgid "The number of tasks currently waiting in the barrier while filling."
msgstr ""
#: ../../library/asyncio-sync.rst:460
msgid "A boolean that is ``True`` if the barrier is in the broken state."
msgstr ""
#: ../../library/asyncio-sync.rst:465
msgid ""
"This exception, a subclass of :exc:`RuntimeError`, is raised when the "
":class:`Barrier` object is reset or broken."
msgstr ""
#: ../../library/asyncio-sync.rst:473
msgid ""
"Acquiring a lock using ``await lock`` or ``yield from lock`` and/or "
":keyword:`with` statement (``with await lock``, ``with (yield from "
"lock)``) was removed. Use ``async with lock`` instead."
msgstr ""
"``await lock`` 이나 ``yield from lock`` 및/또는 :keyword:`with` 문(``with await"
" lock``, ``with (yield from lock)``)을 사용하여 록을 얻는 것은 제거되었습니다. 대신 ``async "
"with lock``\\을 사용하십시오."