|
1 | | -# |
| 1 | +# SOME DESCRIPTIVE TITLE. |
| 2 | +# Copyright (C) 2001 Python Software Foundation |
| 3 | +# This file is distributed under the same license as the Python package. |
| 4 | +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. |
| 5 | +# |
| 6 | +# Translators: |
| 7 | +# Rafael Fontenelle <rffontenelle@gmail.com>, 2026 |
| 8 | +# |
| 9 | +#, fuzzy |
2 | 10 | msgid "" |
3 | 11 | msgstr "" |
| 12 | +"Project-Id-Version: Python 3.15\n" |
| 13 | +"Report-Msgid-Bugs-To: \n" |
| 14 | +"POT-Creation-Date: 2026-06-04 00:33+0000\n" |
| 15 | +"PO-Revision-Date: 2025-09-16 00:01+0000\n" |
| 16 | +"Last-Translator: Rafael Fontenelle <rffontenelle@gmail.com>, 2026\n" |
4 | 17 | "Language-Team: Polish (https://app.transifex.com/python-doc/teams/5390/pl/)\n" |
| 18 | +"MIME-Version: 1.0\n" |
| 19 | +"Content-Type: text/plain; charset=UTF-8\n" |
| 20 | +"Content-Transfer-Encoding: 8bit\n" |
5 | 21 | "Language: pl\n" |
6 | | -"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && (n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" |
| 22 | +"Plural-Forms: nplurals=4; plural=(n==1 ? 0 : (n%10>=2 && n%10<=4) && " |
| 23 | +"(n%100<12 || n%100>14) ? 1 : n!=1 && (n%10>=0 && n%10<=1) || (n%10>=5 && " |
| 24 | +"n%10<=9) || (n%100>=12 && n%100<=14) ? 2 : 3);\n" |
| 25 | + |
| 26 | +msgid ":mod:`!queue` --- A synchronized queue class" |
| 27 | +msgstr "" |
| 28 | + |
| 29 | +msgid "**Source code:** :source:`Lib/queue.py`" |
| 30 | +msgstr "**Kod źródłowy:** :source:`Lib/queue.py`" |
| 31 | + |
| 32 | +msgid "" |
| 33 | +"The :mod:`!queue` module implements multi-producer, multi-consumer queues. " |
| 34 | +"It is especially useful in threaded programming when information must be " |
| 35 | +"exchanged safely between multiple threads. The :class:`Queue` class in this " |
| 36 | +"module implements all the required locking semantics." |
| 37 | +msgstr "" |
| 38 | + |
| 39 | +msgid "" |
| 40 | +"The module implements three types of queue, which differ only in the order " |
| 41 | +"in which the entries are retrieved. In a :abbr:`FIFO (first-in, first-out)` " |
| 42 | +"queue, the first tasks added are the first retrieved. In a :abbr:`LIFO " |
| 43 | +"(last-in, first-out)` queue, the most recently added entry is the first " |
| 44 | +"retrieved (operating like a stack). With a priority queue, the entries are " |
| 45 | +"kept sorted (using the :mod:`heapq` module) and the lowest valued entry is " |
| 46 | +"retrieved first." |
| 47 | +msgstr "" |
| 48 | + |
| 49 | +msgid "" |
| 50 | +"Internally, those three types of queues use locks to temporarily block " |
| 51 | +"competing threads; however, they are not designed to handle reentrancy " |
| 52 | +"within a thread." |
| 53 | +msgstr "" |
| 54 | + |
| 55 | +msgid "" |
| 56 | +"In addition, the module implements a \"simple\" :abbr:`FIFO (first-in, first-" |
| 57 | +"out)` queue type, :class:`SimpleQueue`, whose specific implementation " |
| 58 | +"provides additional guarantees in exchange for the smaller functionality." |
| 59 | +msgstr "" |
| 60 | + |
| 61 | +msgid "The :mod:`!queue` module defines the following classes and exceptions:" |
| 62 | +msgstr "" |
| 63 | + |
| 64 | +msgid "" |
| 65 | +"Constructor for a :abbr:`FIFO (first-in, first-out)` queue. *maxsize* is an " |
| 66 | +"integer that sets the upperbound limit on the number of items that can be " |
| 67 | +"placed in the queue. Insertion will block once this size has been reached, " |
| 68 | +"until queue items are consumed. If *maxsize* is less than or equal to zero, " |
| 69 | +"the queue size is infinite." |
| 70 | +msgstr "" |
| 71 | + |
| 72 | +msgid "" |
| 73 | +"Constructor for a :abbr:`LIFO (last-in, first-out)` queue. *maxsize* is an " |
| 74 | +"integer that sets the upperbound limit on the number of items that can be " |
| 75 | +"placed in the queue. Insertion will block once this size has been reached, " |
| 76 | +"until queue items are consumed. If *maxsize* is less than or equal to zero, " |
| 77 | +"the queue size is infinite." |
| 78 | +msgstr "" |
| 79 | + |
| 80 | +msgid "" |
| 81 | +"Constructor for a priority queue. *maxsize* is an integer that sets the " |
| 82 | +"upperbound limit on the number of items that can be placed in the queue. " |
| 83 | +"Insertion will block once this size has been reached, until queue items are " |
| 84 | +"consumed. If *maxsize* is less than or equal to zero, the queue size is " |
| 85 | +"infinite." |
| 86 | +msgstr "" |
| 87 | + |
| 88 | +msgid "" |
| 89 | +"The lowest valued entries are retrieved first (the lowest valued entry is " |
| 90 | +"the one that would be returned by ``min(entries)``). A typical pattern for " |
| 91 | +"entries is a tuple in the form: ``(priority_number, data)``." |
| 92 | +msgstr "" |
| 93 | + |
| 94 | +msgid "" |
| 95 | +"If the *data* elements are not comparable, the data can be wrapped in a " |
| 96 | +"class that ignores the data item and only compares the priority number::" |
| 97 | +msgstr "" |
| 98 | + |
| 99 | +msgid "" |
| 100 | +"from dataclasses import dataclass, field\n" |
| 101 | +"from typing import Any\n" |
| 102 | +"\n" |
| 103 | +"@dataclass(order=True)\n" |
| 104 | +"class PrioritizedItem:\n" |
| 105 | +" priority: int\n" |
| 106 | +" item: Any=field(compare=False)" |
| 107 | +msgstr "" |
| 108 | +"from dataclasses import dataclass, field\n" |
| 109 | +"from typing import Any\n" |
| 110 | +"\n" |
| 111 | +"@dataclass(order=True)\n" |
| 112 | +"class PrioritizedItem:\n" |
| 113 | +" priority: int\n" |
| 114 | +" item: Any=field(compare=False)" |
| 115 | + |
| 116 | +msgid "" |
| 117 | +"Constructor for an unbounded :abbr:`FIFO (first-in, first-out)` queue. " |
| 118 | +"Simple queues lack advanced functionality such as task tracking." |
| 119 | +msgstr "" |
| 120 | + |
| 121 | +msgid "" |
| 122 | +"Simple queues are :ref:`generic <generics>` over the type of their items." |
| 123 | +msgstr "" |
| 124 | + |
| 125 | +msgid "" |
| 126 | +"Exception raised when non-blocking :meth:`~Queue.get` (or :meth:`~Queue." |
| 127 | +"get_nowait`) is called on a :class:`Queue` object which is empty." |
| 128 | +msgstr "" |
| 129 | + |
| 130 | +msgid "" |
| 131 | +"Exception raised when non-blocking :meth:`~Queue.put` (or :meth:`~Queue." |
| 132 | +"put_nowait`) is called on a :class:`Queue` object which is full." |
| 133 | +msgstr "" |
| 134 | + |
| 135 | +msgid "" |
| 136 | +"Exception raised when :meth:`~Queue.put` or :meth:`~Queue.get` is called on " |
| 137 | +"a :class:`Queue` object which has been shut down." |
| 138 | +msgstr "" |
| 139 | + |
| 140 | +msgid "Queue Objects" |
| 141 | +msgstr "" |
| 142 | + |
| 143 | +msgid "" |
| 144 | +"Queue objects (:class:`Queue`, :class:`LifoQueue`, or :class:" |
| 145 | +"`PriorityQueue`) provide the public methods described below." |
| 146 | +msgstr "" |
| 147 | + |
| 148 | +msgid "" |
| 149 | +"Return the approximate size of the queue. Note, qsize() > 0 doesn't " |
| 150 | +"guarantee that a subsequent get() will not block, nor will qsize() < maxsize " |
| 151 | +"guarantee that put() will not block." |
| 152 | +msgstr "" |
| 153 | + |
| 154 | +msgid "" |
| 155 | +"Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " |
| 156 | +"returns ``True`` it doesn't guarantee that a subsequent call to put() will " |
| 157 | +"not block. Similarly, if empty() returns ``False`` it doesn't guarantee " |
| 158 | +"that a subsequent call to get() will not block." |
| 159 | +msgstr "" |
| 160 | + |
| 161 | +msgid "" |
| 162 | +"Return ``True`` if the queue is full, ``False`` otherwise. If full() " |
| 163 | +"returns ``True`` it doesn't guarantee that a subsequent call to get() will " |
| 164 | +"not block. Similarly, if full() returns ``False`` it doesn't guarantee that " |
| 165 | +"a subsequent call to put() will not block." |
| 166 | +msgstr "" |
| 167 | + |
| 168 | +msgid "" |
| 169 | +"Put *item* into the queue. If optional args *block* is true and *timeout* " |
| 170 | +"is ``None`` (the default), block if necessary until a free slot is " |
| 171 | +"available. If *timeout* is a positive number, it blocks at most *timeout* " |
| 172 | +"seconds and raises the :exc:`Full` exception if no free slot was available " |
| 173 | +"within that time. Otherwise (*block* is false), put an item on the queue if " |
| 174 | +"a free slot is immediately available, else raise the :exc:`Full` exception " |
| 175 | +"(*timeout* is ignored in that case)." |
| 176 | +msgstr "" |
| 177 | + |
| 178 | +msgid "Raises :exc:`ShutDown` if the queue has been shut down." |
| 179 | +msgstr "" |
| 180 | + |
| 181 | +msgid "Equivalent to ``put(item, block=False)``." |
| 182 | +msgstr "" |
| 183 | + |
| 184 | +msgid "" |
| 185 | +"Remove and return an item from the queue. If optional args *block* is true " |
| 186 | +"and *timeout* is ``None`` (the default), block if necessary until an item is " |
| 187 | +"available. If *timeout* is a positive number, it blocks at most *timeout* " |
| 188 | +"seconds and raises the :exc:`Empty` exception if no item was available " |
| 189 | +"within that time. Otherwise (*block* is false), return an item if one is " |
| 190 | +"immediately available, else raise the :exc:`Empty` exception (*timeout* is " |
| 191 | +"ignored in that case)." |
| 192 | +msgstr "" |
| 193 | + |
| 194 | +msgid "" |
| 195 | +"Prior to 3.0 on POSIX systems, and for all versions on Windows, if *block* " |
| 196 | +"is true and *timeout* is ``None``, this operation goes into an " |
| 197 | +"uninterruptible wait on an underlying lock. This means that no exceptions " |
| 198 | +"can occur, and in particular a SIGINT will not trigger a :exc:" |
| 199 | +"`KeyboardInterrupt`." |
| 200 | +msgstr "" |
| 201 | + |
| 202 | +msgid "" |
| 203 | +"Raises :exc:`ShutDown` if the queue has been shut down and is empty, or if " |
| 204 | +"the queue has been shut down immediately." |
| 205 | +msgstr "" |
| 206 | + |
| 207 | +msgid "Equivalent to ``get(False)``." |
| 208 | +msgstr "" |
| 209 | + |
| 210 | +msgid "" |
| 211 | +"Two methods are offered to support tracking whether enqueued tasks have been " |
| 212 | +"fully processed by daemon consumer threads." |
| 213 | +msgstr "" |
| 214 | + |
| 215 | +msgid "" |
| 216 | +"Indicate that a formerly enqueued task is complete. Used by queue consumer " |
| 217 | +"threads. For each :meth:`get` used to fetch a task, a subsequent call to :" |
| 218 | +"meth:`task_done` tells the queue that the processing on the task is complete." |
| 219 | +msgstr "" |
| 220 | + |
| 221 | +msgid "" |
| 222 | +"If a :meth:`join` is currently blocking, it will resume when all items have " |
| 223 | +"been processed (meaning that a :meth:`task_done` call was received for every " |
| 224 | +"item that had been :meth:`put` into the queue)." |
| 225 | +msgstr "" |
| 226 | + |
| 227 | +msgid "" |
| 228 | +"Raises a :exc:`ValueError` if called more times than there were items placed " |
| 229 | +"in the queue." |
| 230 | +msgstr "" |
| 231 | + |
| 232 | +msgid "Blocks until all items in the queue have been gotten and processed." |
| 233 | +msgstr "" |
| 234 | + |
| 235 | +msgid "" |
| 236 | +"The count of unfinished tasks goes up whenever an item is added to the " |
| 237 | +"queue. The count goes down whenever a consumer thread calls :meth:" |
| 238 | +"`task_done` to indicate that the item was retrieved and all work on it is " |
| 239 | +"complete. When the count of unfinished tasks drops to zero, :meth:`join` " |
| 240 | +"unblocks." |
| 241 | +msgstr "" |
| 242 | + |
| 243 | +msgid "Waiting for task completion" |
| 244 | +msgstr "" |
| 245 | + |
| 246 | +msgid "Example of how to wait for enqueued tasks to be completed::" |
| 247 | +msgstr "" |
| 248 | + |
| 249 | +msgid "" |
| 250 | +"import threading\n" |
| 251 | +"import queue\n" |
| 252 | +"\n" |
| 253 | +"q = queue.Queue()\n" |
| 254 | +"\n" |
| 255 | +"def worker():\n" |
| 256 | +" while True:\n" |
| 257 | +" item = q.get()\n" |
| 258 | +" print(f'Working on {item}')\n" |
| 259 | +" print(f'Finished {item}')\n" |
| 260 | +" q.task_done()\n" |
| 261 | +"\n" |
| 262 | +"# Turn-on the worker thread.\n" |
| 263 | +"threading.Thread(target=worker, daemon=True).start()\n" |
| 264 | +"\n" |
| 265 | +"# Send thirty task requests to the worker.\n" |
| 266 | +"for item in range(30):\n" |
| 267 | +" q.put(item)\n" |
| 268 | +"\n" |
| 269 | +"# Block until all tasks are done.\n" |
| 270 | +"q.join()\n" |
| 271 | +"print('All work completed')" |
| 272 | +msgstr "" |
| 273 | + |
| 274 | +msgid "Terminating queues" |
| 275 | +msgstr "" |
| 276 | + |
| 277 | +msgid "" |
| 278 | +"When no longer needed, :class:`Queue` objects can be wound down until empty " |
| 279 | +"or terminated immediately with a hard shutdown." |
| 280 | +msgstr "" |
| 281 | + |
| 282 | +msgid "Put a :class:`Queue` instance into a shutdown mode." |
| 283 | +msgstr "" |
| 284 | + |
| 285 | +msgid "" |
| 286 | +"The queue can no longer grow. Future calls to :meth:`~Queue.put` raise :exc:" |
| 287 | +"`ShutDown`. Currently blocked callers of :meth:`~Queue.put` will be " |
| 288 | +"unblocked and will raise :exc:`ShutDown` in the formerly blocked thread." |
| 289 | +msgstr "" |
| 290 | + |
| 291 | +msgid "" |
| 292 | +"If *immediate* is false (the default), the queue can be wound down normally " |
| 293 | +"with :meth:`~Queue.get` calls to extract tasks that have already been loaded." |
| 294 | +msgstr "" |
| 295 | + |
| 296 | +msgid "" |
| 297 | +"And if :meth:`~Queue.task_done` is called for each remaining task, a " |
| 298 | +"pending :meth:`~Queue.join` will be unblocked normally." |
| 299 | +msgstr "" |
| 300 | + |
| 301 | +msgid "" |
| 302 | +"Once the queue is empty, future calls to :meth:`~Queue.get` will raise :exc:" |
| 303 | +"`ShutDown`." |
| 304 | +msgstr "" |
| 305 | + |
| 306 | +msgid "" |
| 307 | +"If *immediate* is true, the queue is terminated immediately. The queue is " |
| 308 | +"drained to be completely empty and the count of unfinished tasks is reduced " |
| 309 | +"by the number of tasks drained. If unfinished tasks is zero, callers of :" |
| 310 | +"meth:`~Queue.join` are unblocked. Also, blocked callers of :meth:`~Queue." |
| 311 | +"get` are unblocked and will raise :exc:`ShutDown` because the queue is empty." |
| 312 | +msgstr "" |
| 313 | + |
| 314 | +msgid "" |
| 315 | +"Use caution when using :meth:`~Queue.join` with *immediate* set to true. " |
| 316 | +"This unblocks the join even when no work has been done on the tasks, " |
| 317 | +"violating the usual invariant for joining a queue." |
| 318 | +msgstr "" |
| 319 | + |
| 320 | +msgid "SimpleQueue Objects" |
| 321 | +msgstr "" |
| 322 | + |
| 323 | +msgid "" |
| 324 | +":class:`SimpleQueue` objects provide the public methods described below." |
| 325 | +msgstr "" |
| 326 | + |
| 327 | +msgid "" |
| 328 | +"Return the approximate size of the queue. Note, qsize() > 0 doesn't " |
| 329 | +"guarantee that a subsequent get() will not block." |
| 330 | +msgstr "" |
| 331 | + |
| 332 | +msgid "" |
| 333 | +"Return ``True`` if the queue is empty, ``False`` otherwise. If empty() " |
| 334 | +"returns ``False`` it doesn't guarantee that a subsequent call to get() will " |
| 335 | +"not block." |
| 336 | +msgstr "" |
| 337 | + |
| 338 | +msgid "" |
| 339 | +"Put *item* into the queue. The method never blocks and always succeeds " |
| 340 | +"(except for potential low-level errors such as failure to allocate memory). " |
| 341 | +"The optional args *block* and *timeout* are ignored and only provided for " |
| 342 | +"compatibility with :meth:`Queue.put`." |
| 343 | +msgstr "" |
| 344 | + |
| 345 | +msgid "" |
| 346 | +"This method has a C implementation which is reentrant. That is, a ``put()`` " |
| 347 | +"or ``get()`` call can be interrupted by another ``put()`` call in the same " |
| 348 | +"thread without deadlocking or corrupting internal state inside the queue. " |
| 349 | +"This makes it appropriate for use in destructors such as ``__del__`` methods " |
| 350 | +"or :mod:`weakref` callbacks." |
| 351 | +msgstr "" |
| 352 | + |
| 353 | +msgid "" |
| 354 | +"Equivalent to ``put(item, block=False)``, provided for compatibility with :" |
| 355 | +"meth:`Queue.put_nowait`." |
| 356 | +msgstr "" |
| 357 | + |
| 358 | +msgid "Class :class:`multiprocessing.Queue`" |
| 359 | +msgstr "" |
| 360 | + |
| 361 | +msgid "" |
| 362 | +"A queue class for use in a multi-processing (rather than multi-threading) " |
| 363 | +"context." |
| 364 | +msgstr "" |
| 365 | + |
| 366 | +msgid "" |
| 367 | +":class:`collections.deque` is an alternative implementation of unbounded " |
| 368 | +"queues with fast atomic :meth:`~collections.deque.append` and :meth:" |
| 369 | +"`~collections.deque.popleft` operations that do not require locking and also " |
| 370 | +"support indexing." |
| 371 | +msgstr "" |
0 commit comments