Repository navigation
Expand file tree
/
Copy pathasyncio-sync.po
More file actions
595 lines (495 loc) · 22.7 KB
/
Copy pathasyncio-sync.po
File metadata and controls
595 lines (495 loc) · 22.7 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
# SOME DESCRIPTIVE TITLE.
# Copyright (C) 2001-2025, Python Software Foundation
# This file is distributed under the same license as the Python package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
# Translators:
# Dmytro Kazanzhy, 2022
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: Python 3.13\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2025-04-25 14:19+0000\n"
"PO-Revision-Date: 2021-06-28 00:55+0000\n"
"Last-Translator: Dmytro Kazanzhy, 2022\n"
"Language-Team: Ukrainian (https://app.transifex.com/python-doc/teams/5390/"
"uk/)\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Language: uk\n"
"Plural-Forms: nplurals=4; plural=(n % 1 == 0 && n % 10 == 1 && n % 100 != "
"11 ? 0 : n % 1 == 0 && n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 12 || n % "
"100 > 14) ? 1 : n % 1 == 0 && (n % 10 ==0 || (n % 10 >=5 && n % 10 <=9) || "
"(n % 100 >=11 && n % 100 <=14 )) ? 2: 3);\n"
msgid "Synchronization Primitives"
msgstr "Примітиви синхронізації"
msgid "**Source code:** :source:`Lib/asyncio/locks.py`"
msgstr "**Вихідний код:** :source:`Lib/asyncio/locks.py`"
msgid ""
"asyncio synchronization primitives are designed to be similar to those of "
"the :mod:`threading` module with two important caveats:"
msgstr ""
"Примітиви синхронізації asyncio розроблені таким чином, щоб бути подібними "
"до модулів :mod:`threading` з двома важливими застереженнями:"
msgid ""
"asyncio primitives are not thread-safe, therefore they should not be used "
"for OS thread synchronization (use :mod:`threading` for that);"
msgstr ""
"примітиви asyncio не є потокобезпечними, тому їх не слід використовувати для "
"синхронізації потоків ОС (для цього використовуйте :mod:`threading`);"
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` для виконання операцій із "
"тайм-аутами."
msgid "asyncio has the following basic synchronization primitives:"
msgstr "asyncio має такі базові примітиви синхронізації:"
msgid ":class:`Lock`"
msgstr ":class:`Lock`"
msgid ":class:`Event`"
msgstr ":class:`Event`"
msgid ":class:`Condition`"
msgstr ":class:`Condition`"
msgid ":class:`Semaphore`"
msgstr ":class:`Semaphore`"
msgid ":class:`BoundedSemaphore`"
msgstr ":class:`BoundedSemaphore`"
msgid ":class:`Barrier`"
msgstr ""
msgid "Lock"
msgstr "Замок"
msgid "Implements a mutex lock for asyncio tasks. Not thread-safe."
msgstr ""
"Реалізує блокування м'ютексу для асинхронних завдань. Небезпечно для потоків."
msgid ""
"An asyncio lock can be used to guarantee exclusive access to a shared "
"resource."
msgstr ""
"Асинхронне блокування можна використовувати, щоб гарантувати ексклюзивний "
"доступ до спільного ресурсу."
msgid "The preferred way to use a Lock is an :keyword:`async with` statement::"
msgstr ""
"Найкращим способом використання Lock є оператор :keyword:`async with`::"
msgid ""
"lock = asyncio.Lock()\n"
"\n"
"# ... later\n"
"async with lock:\n"
" # access shared state"
msgstr ""
msgid "which is equivalent to::"
msgstr "що еквівалентно::"
msgid ""
"lock = asyncio.Lock()\n"
"\n"
"# ... later\n"
"await lock.acquire()\n"
"try:\n"
" # access shared state\n"
"finally:\n"
" lock.release()"
msgstr ""
msgid "Removed the *loop* parameter."
msgstr "Видалено параметр *loop*."
msgid "Acquire the lock."
msgstr "Придбайте замок."
msgid ""
"This method waits until the lock is *unlocked*, sets it to *locked* and "
"returns ``True``."
msgstr ""
"Цей метод очікує, поки блокування буде *розблоковано*, встановлює його на "
"*заблоковано* та повертає ``True``."
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` заблоковано більше ніж одну співпрограму, яка очікує "
"розблокування блокування, зрештою виконується лише одна співпрограма."
msgid ""
"Acquiring a lock is *fair*: the coroutine that proceeds will be the first "
"coroutine that started waiting on the lock."
msgstr ""
"Отримання блокування є *чесним*: співпрограма, яка продовжується, буде "
"першою співпрограмою, яка почала очікувати на блокування."
msgid "Release the lock."
msgstr "Відпустіть замок."
msgid "When the lock is *locked*, reset it to *unlocked* and return."
msgstr ""
"Коли замок *заблоковано*, скиньте його на *розблоковано* та поверніться."
msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised."
msgstr "Якщо блокування *розблоковано*, виникає :exc:`RuntimeError`."
msgid "Return ``True`` if the lock is *locked*."
msgstr "Повертає ``True``, якщо блокування *заблоковано*."
msgid "Event"
msgstr "Подія"
msgid "An event object. Not thread-safe."
msgstr "Об'єкт події. Небезпечно для потоків."
msgid ""
"An asyncio event can be used to notify multiple asyncio tasks that some "
"event has happened."
msgstr ""
"Асинхронну подію можна використовувати для сповіщення кількох асинхронних "
"завдань про те, що сталася якась подія."
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 керує внутрішнім прапором, який можна встановити на *true* за "
"допомогою методу :meth:`~Event.set` і скинути на *false* за допомогою "
"методу :meth:`clear`. Метод :meth:`~Event.wait` блокується, доки прапор не "
"буде встановлено на *true*. Спочатку для прапора встановлено значення "
"*false*."
msgid "Example::"
msgstr "Приклад::"
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 ""
msgid "Wait until the event is set."
msgstr "Дочекайтеся встановлення події."
msgid ""
"If the event is set, return ``True`` immediately. Otherwise block until "
"another task calls :meth:`~Event.set`."
msgstr ""
"Якщо подія встановлена, негайно поверніть ``True``. Інакше заблокуйте, доки "
"інше завдання не викличе :meth:`~Event.set`."
msgid "Set the event."
msgstr "Встановити подію."
msgid "All tasks waiting for event to be set will be immediately awakened."
msgstr ""
"Усі завдання, які очікують встановлення події, будуть негайно активовані."
msgid "Clear (unset) the event."
msgstr "Очистити (скасувати) подію."
msgid ""
"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` не буде викликано знову."
msgid "Return ``True`` if the event is set."
msgstr "Повертає ``True``, якщо подія встановлена."
msgid "Condition"
msgstr "Хвороба"
msgid "A Condition object. Not thread-safe."
msgstr "Об’єкт Condition. Небезпечно для потоків."
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 ""
"Примітив асинхронної умови може використовуватися завданням для очікування "
"настання певної події та отримання ексклюзивного доступу до спільного "
"ресурсу."
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, що "
"дозволяє координувати ексклюзивний доступ до спільного ресурсу між різними "
"завданнями, зацікавленими в певних станах цього спільного ресурсу."
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 створюється автоматично."
msgid ""
"The preferred way to use a Condition is an :keyword:`async with` statement::"
msgstr ""
"Найкращим способом використання умови є оператор :keyword:`async with`::"
msgid ""
"cond = asyncio.Condition()\n"
"\n"
"# ... later\n"
"async with cond:\n"
" await cond.wait()"
msgstr ""
msgid ""
"cond = asyncio.Condition()\n"
"\n"
"# ... later\n"
"await cond.acquire()\n"
"try:\n"
" await cond.wait()\n"
"finally:\n"
" cond.release()"
msgstr ""
msgid "Acquire the underlying lock."
msgstr "Отримайте основний замок."
msgid ""
"This method waits until the underlying lock is *unlocked*, sets it to "
"*locked* and returns ``True``."
msgstr ""
"Цей метод чекає, доки базове блокування *розблокується*, встановлює його на "
"*locked* і повертає ``True``."
msgid ""
"Wake up *n* tasks (1 by default) waiting on this condition. If fewer than "
"*n* tasks are waiting they are all awakened."
msgstr ""
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 ""
"Блокування має бути отримано перед викликом цього методу та звільнено "
"незабаром після цього. У разі виклику з *розблокованим* блокуванням виникає "
"помилка :exc:`RuntimeError`."
msgid "Return ``True`` if the underlying lock is acquired."
msgstr "Повертає ``True``, якщо основне блокування отримано."
msgid "Wake up all tasks waiting on this condition."
msgstr "Розбудіть усі завдання, що очікують за цієї умови."
msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks."
msgstr ""
"Цей метод діє як :meth:`notify`, але активує всі завдання, що очікують."
msgid "Release the underlying lock."
msgstr "Звільніть базовий замок."
msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised."
msgstr ""
"Під час виклику для розблокованого блокування виникає :exc:`RuntimeError`."
msgid "Wait until notified."
msgstr "Дочекайтеся повідомлення."
msgid ""
"If the calling task has not acquired the lock when this method is called, a :"
"exc:`RuntimeError` is raised."
msgstr ""
"Якщо завдання, що викликає, не отримало блокування під час виклику цього "
"методу, виникає :exc:`RuntimeError`."
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`. Після пробудження умова знову "
"блокується, і цей метод повертає ``True``."
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 ""
msgid "Wait until a predicate becomes *true*."
msgstr "Зачекайте, поки предикат стане *true*."
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 ""
msgid "Semaphore"
msgstr "Семафор"
msgid "A Semaphore object. Not thread-safe."
msgstr "Об'єкт Semaphore. Небезпечно для потоків."
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`. Лічильник "
"ніколи не може опускатися нижче нуля; коли :meth:`acquire` виявляє, що він "
"дорівнює нулю, він блокується, чекаючи, поки якесь завдання викличе :meth:"
"`release`."
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`."
msgid ""
"The preferred way to use a Semaphore is an :keyword:`async with` statement::"
msgstr ""
"Кращим способом використання семафора є оператор :keyword:`async with`::"
msgid ""
"sem = asyncio.Semaphore(10)\n"
"\n"
"# ... later\n"
"async with sem:\n"
" # work with shared resource"
msgstr ""
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 ""
msgid "Acquire a semaphore."
msgstr "Придбайте семафор."
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 ""
"Якщо внутрішній лічильник більший за нуль, зменште його на одиницю та "
"негайно поверніть ``True``. Якщо він дорівнює нулю, дочекайтеся виклику :"
"meth:`release` і поверніть ``True``."
msgid "Returns ``True`` if semaphore can not be acquired immediately."
msgstr "Повертає ``True``, якщо семафор не може бути отриманий негайно."
msgid ""
"Release a semaphore, incrementing the internal counter by one. Can wake up a "
"task waiting to acquire the semaphore."
msgstr ""
"Відпустіть семафор, збільшивши внутрішній лічильник на одиницю. Може "
"розбудити завдання, яке очікує отримання семафора."
msgid ""
"Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more "
"``release()`` calls than ``acquire()`` calls."
msgstr ""
"На відміну від :class:`BoundedSemaphore`, :class:`Semaphore` дозволяє робити "
"більше викликів ``release()``, ніж викликів ``acquire()``."
msgid "BoundedSemaphore"
msgstr "Обмежений семафор"
msgid "A bounded semaphore object. Not thread-safe."
msgstr "Обмежений семафорний об’єкт. Небезпечно для потоків."
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 ""
"Обмежений семафор — це версія :class:`Semaphore`, яка викликає :exc:"
"`ValueError` у :meth:`~Semaphore.release`, якщо він збільшує внутрішній "
"лічильник вище початкового *значення*."
msgid "Barrier"
msgstr ""
msgid "A barrier object. Not thread-safe."
msgstr ""
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 ""
msgid ""
":keyword:`async with` can be used as an alternative to awaiting on :meth:"
"`~Barrier.wait`."
msgstr ""
msgid "The barrier can be reused any number of times."
msgstr ""
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 ""
msgid "Result of this example is::"
msgstr ""
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 ""
msgid ""
"Pass the barrier. When all the tasks party to the barrier have called this "
"function, they are all unblocked simultaneously."
msgstr ""
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 ""
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 ""
msgid ""
"...\n"
"async with barrier as position:\n"
" if position == 0:\n"
" # Only one task prints this\n"
" print('End of *draining phase*')"
msgstr ""
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 ""
msgid ""
"Return the barrier to the default, empty state. Any tasks waiting on it "
"will receive the :class:`BrokenBarrierError` exception."
msgstr ""
msgid ""
"If a barrier is broken it may be better to just leave it and create a new "
"one."
msgstr ""
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 ""
msgid "The number of tasks required to pass the barrier."
msgstr ""
msgid "The number of tasks currently waiting in the barrier while filling."
msgstr ""
msgid "A boolean that is ``True`` if the barrier is in the broken state."
msgstr ""
"Логічне значення, яке має значення ``True``, якщо бар’єр знаходиться в "
"зламаному стані."
msgid ""
"This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:"
"`Barrier` object is reset or broken."
msgstr ""
"Цей виняток, підклас :exc:`RuntimeError`, виникає, коли об’єкт :class:"
"`Barrier` скидається або зламано."
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``."