python-docs-fr/library/asyncio-sync.po

602 lines
22 KiB
Plaintext
Raw Normal View History

2018-07-04 09:06:45 +00:00
# Copyright (C) 2001-2018, Python Software Foundation
2018-07-04 09:08:42 +00:00
# For licence information, see README file.
2016-10-30 09:46:26 +00:00
#
msgid ""
msgstr ""
2019-12-05 22:15:54 +00:00
"Project-Id-Version: Python 3\n"
2016-10-30 09:46:26 +00:00
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2023-01-15 22:33+0100\n"
"PO-Revision-Date: 2023-06-11 16:49+0200\n"
"Last-Translator: Christophe Nanteuil <christophe.nanteuil@gmail.com>\n"
2018-07-04 09:14:25 +00:00
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
2017-05-23 22:40:56 +00:00
"Language: fr\n"
2016-10-30 09:46:26 +00:00
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Poedit 3.2.2\n"
2016-10-30 09:46:26 +00:00
#: library/asyncio-sync.rst:7
2018-10-13 15:54:03 +00:00
msgid "Synchronization Primitives"
2020-02-14 10:18:53 +00:00
msgstr "Primitives de synchronisation"
2016-10-30 09:46:26 +00:00
#: library/asyncio-sync.rst:9
msgid "**Source code:** :source:`Lib/asyncio/locks.py`"
msgstr "**Code source :** :source:`Lib/asyncio/locks.py`"
#: library/asyncio-sync.rst:13
2018-10-13 15:54:03 +00:00
msgid ""
"asyncio synchronization primitives are designed to be similar to those of "
"the :mod:`threading` module with two important caveats:"
msgstr ""
"Les primitives de synchronisation *asyncio* sont conçues pour être "
"similaires à celles du module :mod:`threading` avec deux mises en garde "
"importantes :"
2018-10-13 15:54:03 +00:00
#: library/asyncio-sync.rst:16
2018-10-13 15:54:03 +00:00
msgid ""
"asyncio primitives are not thread-safe, therefore they should not be used "
"for OS thread synchronization (use :mod:`threading` for that);"
msgstr ""
"les primitives *asyncio* ne sont pas *thread-safe*, elles ne doivent donc "
"pas être utilisées pour la synchronisation des fils d'exécution du système "
"d'exploitation (utilisez :mod:`threading` pour cela) ;"
2018-10-13 15:54:03 +00:00
#: library/asyncio-sync.rst:20
2018-10-13 15:54:03 +00:00
msgid ""
"methods of these synchronization primitives do not accept the *timeout* "
"argument; use the :func:`asyncio.wait_for` function to perform operations "
"with timeouts."
2017-08-01 11:29:09 +00:00
msgstr ""
"les méthodes de ces primitives de synchronisation n'acceptent pas l'argument "
"*timeout* ; utilisez la fonction :func:`asyncio.wait_for` pour effectuer des "
"opérations avec des délais d'attente."
2017-08-01 11:29:09 +00:00
#: library/asyncio-sync.rst:24
msgid "asyncio has the following basic synchronization primitives:"
2018-10-13 15:54:03 +00:00
msgstr ""
"*asyncio* possède les primitives de synchronisation de base suivantes :"
2018-10-13 15:54:03 +00:00
#: library/asyncio-sync.rst:26
2016-10-30 09:46:26 +00:00
msgid ":class:`Lock`"
msgstr ":class:`Lock`"
#: library/asyncio-sync.rst:27
2016-10-30 09:46:26 +00:00
msgid ":class:`Event`"
msgstr ":class:`Event`"
#: library/asyncio-sync.rst:28
2016-10-30 09:46:26 +00:00
msgid ":class:`Condition`"
msgstr ":class:`Condition`"
#: library/asyncio-sync.rst:29
2016-10-30 09:46:26 +00:00
msgid ":class:`Semaphore`"
msgstr ":class:`Semaphore`"
#: library/asyncio-sync.rst:30
2016-10-30 09:46:26 +00:00
msgid ":class:`BoundedSemaphore`"
msgstr ":class:`BoundedSemaphore`"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:31
msgid ":class:`Barrier`"
msgstr ":class:`Barrier`"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:38
2016-10-30 09:46:26 +00:00
msgid "Lock"
msgstr "Verrou (*lock*)"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:42
2018-10-13 15:54:03 +00:00
msgid "Implements a mutex lock for asyncio tasks. Not thread-safe."
2016-10-30 09:46:26 +00:00
msgstr ""
"Implémente un verrou exclusif (*mutex*) pour les tâches asynchrones. Ce "
"n'est pas compatible avec les programmes à fils d'exécution multiples."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:44
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"An asyncio lock can be used to guarantee exclusive access to a shared "
"resource."
2016-10-30 09:46:26 +00:00
msgstr ""
"Un verrou *asyncio* peut être utilisé pour garantir un accès exclusif à une "
"ressource partagée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:47
2018-10-13 15:54:03 +00:00
msgid "The preferred way to use a Lock is an :keyword:`async with` statement::"
2016-10-30 09:46:26 +00:00
msgstr ""
"La meilleure façon d'utiliser un verrou est une instruction :keyword:`async "
"with` ::"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:199 library/asyncio-sync.rst:298
2018-10-13 15:54:03 +00:00
msgid "which is equivalent to::"
msgstr "ce qui équivaut à ::"
2016-10-30 09:46:26 +00:00
# suit un :
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:112 library/asyncio-sync.rst:286
#: library/asyncio-sync.rst:341
2022-03-23 17:40:12 +00:00
msgid "Removed the *loop* parameter."
msgstr "suppression du paramètre *loop*."
2019-10-09 16:10:12 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:72
2018-10-13 15:54:03 +00:00
msgid "Acquire the lock."
msgstr "Verrouille (ou acquiert) le verrou."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:74
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"This method waits until the lock is *unlocked*, sets it to *locked* and "
2016-10-30 09:46:26 +00:00
"returns ``True``."
msgstr ""
"Cette méthode attend que le verrou soit déverrouillé (*unlocked*), le "
"verrouille (positionné sur *locked*) et renvoie ``True``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:77
2019-06-03 20:16:11 +00:00
msgid ""
"When more than one coroutine is blocked in :meth:`acquire` waiting for the "
"lock to be unlocked, only one coroutine eventually proceeds."
msgstr ""
"Lorsque plus d'une coroutine est bloquée dans :meth:`acquire` en attendant "
"que le verrou soit déverrouillé, seule une coroutine continue finalement."
2019-06-03 20:16:11 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:81
2019-06-03 20:16:11 +00:00
msgid ""
"Acquiring a lock is *fair*: the coroutine that proceeds will be the first "
"coroutine that started waiting on the lock."
msgstr ""
"L'acquisition d'un verrou est *équitable* : la coroutine qui acquiert le "
"verrou est celle qui était la première à attendre le verrou."
2019-06-03 20:16:11 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:86
2018-10-13 15:54:03 +00:00
msgid "Release the lock."
msgstr "Libère le verrou."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:88
2018-10-13 15:54:03 +00:00
msgid "When the lock is *locked*, reset it to *unlocked* and return."
msgstr "Lorsque le verrou est verrouillé, le déverrouille et termine."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:90
2018-10-13 15:54:03 +00:00
msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised."
msgstr "Si le verrou est déjà déverrouillé, une :exc:`RuntimeError` est levée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:94
2018-10-13 15:54:03 +00:00
msgid "Return ``True`` if the lock is *locked*."
msgstr "Renvoie ``True`` si le verrou est verrouillé."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:98
2016-10-30 09:46:26 +00:00
msgid "Event"
msgstr "Événement (*Event*)"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:102
2018-10-13 15:54:03 +00:00
msgid "An event object. Not thread-safe."
msgstr ""
"Objet événement. Non compatible avec les programmes à plusieurs fils "
"d'exécution."
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:104
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"An asyncio event can be used to notify multiple asyncio tasks that some "
"event has happened."
2016-10-30 09:46:26 +00:00
msgstr ""
"Un événement asynchrone peut être utilisé pour notifier plusieurs tâches "
"asynchrones qu'un événement s'est produit."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:107
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"An Event object manages an internal flag that can be set to *true* with the :"
2021-01-27 19:42:04 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"Un objet *Event* gère un drapeau interne qui peut être activé (ou mis à "
"*vrai*) avec la méthode :meth:`~Event.set` et désactivé (ou mis à *faux*) "
"avec la méthode :meth:`clear`. La méthode :meth:`~Event.wait` se bloque "
"jusqu'à ce que l'indicateur soit activé. L'indicateur est initialement "
"désactivé."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:365
2018-10-13 15:54:03 +00:00
msgid "Example::"
msgstr "Exemple ::"
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:142
2018-10-13 15:54:03 +00:00
msgid "Wait until the event is set."
msgstr "Attend que l'évènement soit activé."
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:144
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"If the event is set, return ``True`` immediately. Otherwise block until "
2021-01-27 19:42:04 +00:00
"another task calls :meth:`~Event.set`."
2016-10-30 09:46:26 +00:00
msgstr ""
"Si l'événement est activé (*vrai*), renvoie ``True`` immédiatement. Sinon "
"bloque jusqu'à ce qu'une autre tâche appelle :meth:`~Event.set`."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:149
2018-10-13 15:54:03 +00:00
msgid "Set the event."
msgstr "Active l'événement."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:151
2018-10-13 15:54:03 +00:00
msgid "All tasks waiting for event to be set will be immediately awakened."
2016-10-30 09:46:26 +00:00
msgstr ""
"Toutes les tâches en attente de l'événement sont immédiatement réveillées."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:156
2018-10-13 15:54:03 +00:00
msgid "Clear (unset) the event."
msgstr "Efface (désactive) l'événement."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:158
2016-10-30 09:46:26 +00:00
msgid ""
2021-01-27 19:42:04 +00:00
"Tasks awaiting on :meth:`~Event.wait` will now block until the :meth:`~Event."
"set` method is called again."
2016-10-30 09:46:26 +00:00
msgstr ""
"Les tâches en attente sur :meth:`~Event.wait` seront désormais bloquées "
"jusqu'à ce que la méthode :meth:`~Event.set` soit à nouveau appelée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:163
2018-10-13 15:54:03 +00:00
msgid "Return ``True`` if the event is set."
msgstr "Renvoie ``True`` si l'évènement est actif."
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:167
2016-10-30 09:46:26 +00:00
msgid "Condition"
msgstr "Condition"
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:171
2018-10-13 15:54:03 +00:00
msgid "A Condition object. Not thread-safe."
msgstr ""
"Objet Condition. Non compatible avec les programmes à plusieurs fils "
"d'exécution."
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:173
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"Une primitive de condition asynchrone peut être utilisée par une tâche pour "
"attendre qu'un événement se produise, puis obtenir un accès exclusif à une "
"ressource partagée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:177
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"Essentiellement, un objet *Condition* combine les fonctionnalités d'un :"
"class:`Event` et d'un :class:`Lock`. Il est possible que plusieurs objets "
"*Condition* partagent un seul verrou, ce qui permet de coordonner l'accès "
"exclusif à une ressource partagée entre différentes tâches intéressées par "
"des états particuliers de cette ressource partagée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:183
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"The optional *lock* argument must be a :class:`Lock` object or ``None``. In "
"the latter case a new Lock object is created automatically."
2016-10-30 09:46:26 +00:00
msgstr ""
"L'argument optionnel *lock* doit être un objet :class:`Lock` ou ``None``. "
"Dans ce dernier cas, un nouvel objet *Lock* est créé automatiquement."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:190
2018-06-28 13:32:56 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"The preferred way to use a Condition is an :keyword:`async with` statement::"
2018-06-28 13:32:56 +00:00
msgstr ""
"La meilleure façon d'utiliser une *Condition* est une instruction :keyword:"
"`async with` ::"
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:212
2016-10-30 09:46:26 +00:00
msgid "Acquire the underlying lock."
msgstr "Verrouille le verrou sous-jacent."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:214
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"This method waits until the underlying lock is *unlocked*, sets it to "
"*locked* and returns ``True``."
2016-10-30 09:46:26 +00:00
msgstr ""
"Cette méthode attend que le verrou sous-jacent soit déverrouillé, le "
"verrouille et renvoie ``True``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:219
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"Wake up at most *n* tasks (1 by default) waiting on this condition. The "
"method is no-op if no tasks are waiting."
2016-10-30 09:46:26 +00:00
msgstr ""
"Réveille au plus *n* tâches (1 par défaut) en attente de cette condition. La "
"méthode ne fait rien si aucune tâche n'est en attente."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:237
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"Le verrou doit être verrouillé avant que cette méthode ne soit appelée et "
"libéré peu de temps après. S'il est appelé avec un verrou déverrouillé, une "
"erreur :exc:`RuntimeError` est levée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:228
2016-10-30 09:46:26 +00:00
msgid "Return ``True`` if the underlying lock is acquired."
msgstr "Renvoie ``True`` si le verrou sous-jacent est verrouillé."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:232
2018-10-13 15:54:03 +00:00
msgid "Wake up all tasks waiting on this condition."
msgstr "Réveille toutes les tâches en attente sur cette condition."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:234
2018-10-13 15:54:03 +00:00
msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks."
msgstr ""
"Cette méthode agit comme :meth:`notify`, mais réveille toutes les tâches en "
"attente."
2018-10-13 15:54:03 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:243
2016-10-30 09:46:26 +00:00
msgid "Release the underlying lock."
msgstr "Libère le verrou sous-jacent."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:245
2018-10-13 15:54:03 +00:00
msgid "When invoked on an unlocked lock, a :exc:`RuntimeError` is raised."
2016-10-30 09:46:26 +00:00
msgstr ""
"Lorsqu'elle est invoquée sur un verrou déverrouillé, une :exc:`RuntimeError` "
"est levée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:250
2016-10-30 09:46:26 +00:00
msgid "Wait until notified."
msgstr "Attend d'être notifié."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:252
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"If the calling task has not acquired the lock when this method is called, a :"
"exc:`RuntimeError` is raised."
2016-10-30 09:46:26 +00:00
msgstr ""
"Si la tâche appelante n'a pas verrouillé le verrou lorsque cette méthode est "
"appelée, une :exc:`RuntimeError` est levée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:255
2016-10-30 09:46:26 +00:00
msgid ""
"This method releases the underlying lock, and then blocks until it is "
2018-10-13 15:54:03 +00:00
"awakened by a :meth:`notify` or :meth:`notify_all` call. Once awakened, the "
"Condition re-acquires its lock and this method returns ``True``."
2016-10-30 09:46:26 +00:00
msgstr ""
"Cette méthode libère le verrou sous-jacent, puis se bloque jusqu'à ce "
"qu'elle soit réveillée par un appel :meth:`notify` ou :meth:`notify_all`. "
"Une fois réveillée, la *Condition* verrouille à nouveau son verrou et cette "
"méthode renvoie ``True``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:262
2018-10-13 15:54:03 +00:00
msgid "Wait until a predicate becomes *true*."
msgstr "Attend jusqu'à ce qu'un prédicat devienne vrai."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:264
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"The predicate must be a callable which result will be interpreted as a "
"boolean value. The final value is the return value."
2016-10-30 09:46:26 +00:00
msgstr ""
"Le prédicat doit être un appelable dont le résultat est interprété comme une "
"valeur booléenne. La valeur finale est la valeur de retour."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:270
2016-10-30 09:46:26 +00:00
msgid "Semaphore"
msgstr "Sémaphore"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:274
2018-10-13 15:54:03 +00:00
msgid "A Semaphore object. Not thread-safe."
2016-10-30 09:46:26 +00:00
msgstr ""
"Objet *Sémaphore*. Non compatible avec les programmes à plusieurs fils "
"d'exécution."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:276
2016-10-30 09:46:26 +00:00
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, "
2018-10-13 15:54:03 +00:00
"waiting until some task calls :meth:`release`."
2016-10-30 09:46:26 +00:00
msgstr ""
"Un sémaphore gère un compteur interne qui est décrémenté à chaque appel :"
"meth:`acquire` et incrémenté à chaque appel :meth:`release`. Le compteur ne "
"peut jamais descendre en dessous de zéro ; quand :meth:`acquire` trouve "
"qu'il est égal à zéro, il se bloque, en attendant qu'une tâche appelle :meth:"
"`release`."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:282
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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."
2016-10-30 09:46:26 +00:00
msgstr ""
"L'argument optionnel *value* donne la valeur initiale du compteur interne "
"(``1`` par défaut). Si la valeur donnée est inférieure à ``0`` une :exc:"
"`ValueError` est levée."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:289
2018-06-28 13:32:56 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"The preferred way to use a Semaphore is an :keyword:`async with` statement::"
2018-06-28 13:32:56 +00:00
msgstr ""
"La meilleure façon d'utiliser un sémaphore est une instruction :keyword:"
"`async with` ::"
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:311
2016-10-30 09:46:26 +00:00
msgid "Acquire a semaphore."
msgstr "Acquiert un sémaphore."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:313
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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``."
2016-10-30 09:46:26 +00:00
msgstr ""
"Si le compteur interne est supérieur à zéro, le décrémente d'une unité et "
"renvoie ``True`` immédiatement. Si c'est zéro, attend que :meth:`release` "
"soit appelée et renvoie ``True``."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:319
2016-10-30 09:46:26 +00:00
msgid "Returns ``True`` if semaphore can not be acquired immediately."
msgstr ""
"Renvoie ``True`` si le sémaphore ne peut pas être acquis immédiatement."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:323
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"Release a semaphore, incrementing the internal counter by one. Can wake up a "
"task waiting to acquire the semaphore."
2016-10-30 09:46:26 +00:00
msgstr ""
"Relâche un sémaphore, incrémentant le compteur interne d'une unité. Peut "
"réveiller une tâche en attente d'acquisition du sémaphore."
2016-10-30 09:46:26 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:326
2016-10-30 09:46:26 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"Unlike :class:`BoundedSemaphore`, :class:`Semaphore` allows making more "
"``release()`` calls than ``acquire()`` calls."
2016-10-30 09:46:26 +00:00
msgstr ""
"Contrairement à :class:`BoundedSemaphore`, :class:`Semaphore` permet de "
"faire plus d'appels ``release()`` que d'appels ``acquire()``."
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:331
2018-10-13 15:54:03 +00:00
msgid "BoundedSemaphore"
msgstr "Sémaphore capé (*BoundedSemaphore*)"
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:335
2018-10-13 15:54:03 +00:00
msgid "A bounded semaphore object. Not thread-safe."
2018-06-28 13:32:56 +00:00
msgstr ""
"Objet sémaphore capé. Non compatible avec les programmes à plusieurs fils "
"d'exécution."
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:337
2018-06-28 13:32:56 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"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*."
2018-06-28 13:32:56 +00:00
msgstr ""
"*Bounded Semaphore* est une version de :class:`Semaphore` qui lève une :exc:"
"`ValueError` dans :meth:`~Semaphore.release` s'il augmente le compteur "
"interne au-dessus de la *value* initiale."
2018-06-28 13:32:56 +00:00
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:346
msgid "Barrier"
msgstr "Barrière (*Barrier*)"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:350
msgid "A barrier object. Not thread-safe."
msgstr ""
"Objet barrière. Non compatible avec les programmes à plusieurs fils "
"d'exécution."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:352
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 ""
"Une barrière est une simple primitive de synchronisation qui permet de "
"bloquer jusqu'à ce que *parties* tâches l'attendent. Les tâches attendent "
"sur la méthode :meth:`~Barrier.wait` et sont bloquées jusqu'à ce que le "
"nombre spécifié de tâches attendent sur :meth:`~Barrier.wait`. À ce stade, "
"toutes les tâches en attente se débloquent simultanément."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:358
msgid ""
":keyword:`async with` can be used as an alternative to awaiting on :meth:"
"`~Barrier.wait`."
msgstr ""
":keyword:`async with` peut être utilisé comme alternative à l'attente sur :"
"meth:`~Barrier.wait`."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:361
msgid "The barrier can be reused any number of times."
msgstr "La barrière peut être réutilisée un nombre illimité de fois."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:388
msgid "Result of this example is::"
msgstr "Le résultat de cet exemple est ::"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:399
msgid ""
"Pass the barrier. When all the tasks party to the barrier have called this "
"function, they are all unblocked simultaneously."
msgstr ""
"Passe la barrière. Lorsque toutes les tâches bloquées à la barrière ont "
"appelé cette fonction, elles sont toutes débloquées simultanément."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:402
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 ""
"Lorsqu'une tâche en attente ou bloquée à la barrière est annulée, cette "
"tâche sort de la barrière qui reste dans le même état. Si la barrière est en "
"cours de « remplissage », le nombre de tâche en attente diminue de 1."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:407
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 ""
"La valeur de retour est un entier compris entre 0 et ``parties-1``, "
"différent pour chaque tâche. Cela peut être utilisé pour sélectionner une "
"tâche qui fera du ménage, par exemple ::"
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:417
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 ""
"Cette méthode peut lever une exception :class:`BrokenBarrierError` si la "
"barrière est brisée ou réinitialisée alors qu'une tâche est en attente. Cela "
"peut lever une :exc:`CancelledError` si une tâche est annulée."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:423
msgid ""
"Return the barrier to the default, empty state. Any tasks waiting on it "
"will receive the :class:`BrokenBarrierError` exception."
msgstr ""
"Ramène la barrière à l'état vide par défaut. Toutes les tâches en attente "
"reçoivent l'exception :class:`BrokenBarrierError`."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:426
msgid ""
"If a barrier is broken it may be better to just leave it and create a new "
"one."
msgstr ""
"Si une barrière est brisée, il peut être préférable de la quitter et d'en "
"créer une nouvelle."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:430
msgid ""
"Put the barrier into a broken state. This causes any active or future calls "
"to :meth:`wait` to fail with the :class:`BrokenBarrierError`. Use this for "
"example if one of the tasks needs to abort, to avoid infinite waiting tasks."
2022-05-22 21:15:02 +00:00
msgstr ""
"Met la barrière dans un état cassé. Cela provoque l'échec de tout appel "
"actif ou futur à :meth:`wait` avec une :class:`BrokenBarrierError`. Utilisez "
"ceci par exemple si l'une des tâches doit être abandonnée, pour éviter des "
"tâches en attente infinie."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:437
msgid "The number of tasks required to pass the barrier."
msgstr "Le nombre de tâches nécessaires pour franchir la barrière."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:441
msgid "The number of tasks currently waiting in the barrier while filling."
msgstr ""
"Le nombre de tâches actuellement en attente à la barrière pendant le "
"remplissage."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:445
msgid "A boolean that is ``True`` if the barrier is in the broken state."
msgstr "Booléen qui vaut ``True`` si la barrière est rompue."
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:450
msgid ""
"This exception, a subclass of :exc:`RuntimeError`, is raised when the :class:"
"`Barrier` object is reset or broken."
msgstr ""
"Cette exception, une sous-classe de :exc:`RuntimeError`, est déclenchée "
"lorsque l'objet :class:`Barrier` est réinitialisé ou cassé."
2022-05-22 21:15:02 +00:00
# suit un :
2022-05-22 21:15:02 +00:00
#: library/asyncio-sync.rst:458
2018-06-28 13:32:56 +00:00
msgid ""
2018-10-13 15:54:03 +00:00
"Acquiring a lock using ``await lock`` or ``yield from lock`` and/or :keyword:"
2020-07-20 08:56:42 +00:00
"`with` statement (``with await lock``, ``with (yield from lock)``) was "
"removed. Use ``async with lock`` instead."
2018-06-28 13:32:56 +00:00
msgstr ""
"l'acquisition d'un verrou en utilisant ``wait lock`` ou ``yield from lock`` "
"ou :keyword:`with` (``with await lock``, ``with (yield from lock)``) a été "
"supprimée. Utilisez ``async with lock`` à la place."