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 ""
|
|
|
|
|
"Project-Id-Version: Python 3.6\n"
|
|
|
|
|
"Report-Msgid-Bugs-To: \n"
|
2019-11-15 22:57:16 +00:00
|
|
|
|
"POT-Creation-Date: 2019-11-15 18:54+0100\n"
|
2018-10-14 22:47:12 +00:00
|
|
|
|
"PO-Revision-Date: 2018-10-15 00:46+0200\n"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\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"
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:7
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Synchronization Primitives"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:9
|
2019-11-15 22:57:16 +00:00
|
|
|
|
msgid "**Source code:** :source:`Lib/asyncio/locks.py`"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:24
|
2019-05-23 16:59:19 +00:00
|
|
|
|
msgid "asyncio has the following basic synchronization primitives:"
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:26
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`Lock`"
|
|
|
|
|
msgstr ":class:`Lock`"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:27
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`Event`"
|
|
|
|
|
msgstr ":class:`Event`"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:28
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`Condition`"
|
|
|
|
|
msgstr ":class:`Condition`"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:29
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`Semaphore`"
|
|
|
|
|
msgstr ":class:`Semaphore`"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:30
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ":class:`BoundedSemaphore`"
|
|
|
|
|
msgstr ":class:`BoundedSemaphore`"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:37
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Lock"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:41
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:43
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:46
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:55 ../Doc/library/asyncio-sync.rst:200
|
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:300
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "which is equivalent to::"
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:68 ../Doc/library/asyncio-sync.rst:114
|
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:190 ../Doc/library/asyncio-sync.rst:290
|
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:345
|
2019-10-09 16:10:12 +00:00
|
|
|
|
msgid "The *loop* parameter."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:71
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Acquire the lock."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:73
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:76
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:80
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:85
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Release the lock."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr "Libère un verrou."
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:87
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "When the lock is *locked*, reset it to *unlocked* and return."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:89
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "If the lock is *unlocked*, a :exc:`RuntimeError` is raised."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:93
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Return ``True`` if the lock is *locked*."
|
2018-10-14 22:47:12 +00:00
|
|
|
|
msgstr "Donne ``True`` si le verrou est verrouillé."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:97
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Event"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:101
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "An event object. Not thread-safe."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:103
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:106
|
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 :"
|
|
|
|
|
"meth:`set` method and reset to *false* with the :meth:`clear` method. The :"
|
|
|
|
|
"meth:`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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:117
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Example::"
|
2018-10-13 16:23:07 +00:00
|
|
|
|
msgstr "Exemple ::"
|
2018-10-13 15:54:03 +00:00
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:142
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Wait until the event is set."
|
2018-10-14 22:47:12 +00:00
|
|
|
|
msgstr "Attend que l'évènement ait une valeur."
|
2018-10-13 15:54:03 +00:00
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 "
|
|
|
|
|
"another task calls :meth:`set`."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:149
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Set the event."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:156
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Clear (unset) the event."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:158
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid ""
|
2018-10-13 15:54:03 +00:00
|
|
|
|
"Tasks awaiting on :meth:`wait` will now block until the :meth:`set` method "
|
|
|
|
|
"is called again."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 a une valeur."
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:167
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Condition"
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:171
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "A Condition object. Not thread-safe."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:191
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:213
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Acquire the underlying lock."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:215
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:220
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:223 ../Doc/library/asyncio-sync.rst:238
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:229
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Return ``True`` if the underlying lock is acquired."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:233
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Wake up all tasks waiting on this condition."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:235
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "This method acts like :meth:`notify`, but wakes up all waiting tasks."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:244
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Release the underlying lock."
|
|
|
|
|
msgstr "Libère le verrou sous-jacent."
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:246
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:251
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Wait until notified."
|
|
|
|
|
msgstr "Attends d'être notifié."
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:253
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:256
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:263
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "Wait until a predicate becomes *true*."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr "Attends jusqu'à ce qu'un prédicat devienne vrai."
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:265
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:271
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Semaphore"
|
|
|
|
|
msgstr "Sémaphore"
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:275
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "A Semaphore object. Not thread-safe."
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:277
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:283
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:291
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:313
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Acquire a semaphore."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:315
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:321
|
2016-10-30 09:46:26 +00:00
|
|
|
|
msgid "Returns ``True`` if semaphore can not be acquired immediately."
|
|
|
|
|
msgstr ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:325
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:328
|
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 ""
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:333
|
2018-10-13 15:54:03 +00:00
|
|
|
|
msgid "BoundedSemaphore"
|
|
|
|
|
msgstr "BoundedSemaphore"
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:337
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:339
|
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 ""
|
|
|
|
|
|
2019-11-15 22:57:16 +00:00
|
|
|
|
#: ../Doc/library/asyncio-sync.rst:352
|
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:"
|
|
|
|
|
"`with` statement (``with await lock``, ``with (yield from lock)``) is "
|
|
|
|
|
"deprecated. Use ``async with lock`` instead."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
msgstr ""
|
|
|
|
|
|
2018-10-13 15:54:03 +00:00
|
|
|
|
#~ msgid "Semaphores:"
|
|
|
|
|
#~ msgstr "Sémaphores :"
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
2018-10-13 15:54:03 +00:00
|
|
|
|
#~ msgid "This method is a :ref:`coroutine <coroutine>`."
|
|
|
|
|
#~ msgstr "Cette méthode est une :ref:`coroutine <coroutine>`."
|
|
|
|
|
|
|
|
|
|
#~ msgid "There is no return value."
|
|
|
|
|
#~ msgstr "Il n'y a pas de valeur de retour."
|
2018-06-28 13:32:56 +00:00
|
|
|
|
|
|
|
|
|
#~ msgid "Semaphores"
|
|
|
|
|
#~ msgstr "Sémaphores"
|