forked from AFPy/python-docs-fr
267 lines
11 KiB
Plaintext
267 lines
11 KiB
Plaintext
# Copyright (C) 2001-2018, Python Software Foundation
|
|
# For licence information, see README file.
|
|
#
|
|
msgid ""
|
|
msgstr ""
|
|
"Project-Id-Version: Python 3\n"
|
|
"Report-Msgid-Bugs-To: \n"
|
|
"POT-Creation-Date: 2019-09-04 11:33+0200\n"
|
|
"PO-Revision-Date: 2019-09-04 11:44+0200\n"
|
|
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
|
"Language-Team: FRENCH <traductions@lists.afpy.org>\n"
|
|
"Language: fr\n"
|
|
"MIME-Version: 1.0\n"
|
|
"Content-Type: text/plain; charset=UTF-8\n"
|
|
"Content-Transfer-Encoding: 8bit\n"
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:2
|
|
msgid ""
|
|
":mod:`multiprocessing.shared_memory` --- Provides shared memory for direct "
|
|
"access across processes"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:7
|
|
msgid "**Source code:** :source:`Lib/multiprocessing/shared_memory.py`"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:18
|
|
msgid ""
|
|
"This module provides a class, :class:`SharedMemory`, for the allocation and "
|
|
"management of shared memory to be accessed by one or more processes on a "
|
|
"multicore or symmetric multiprocessor (SMP) machine. To assist with the "
|
|
"life-cycle management of shared memory especially across distinct processes, "
|
|
"a :class:`~multiprocessing.managers.BaseManager` subclass, :class:"
|
|
"`SharedMemoryManager`, is also provided in the ``multiprocessing.managers`` "
|
|
"module."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:26
|
|
msgid ""
|
|
"In this module, shared memory refers to \"System V style\" shared memory "
|
|
"blocks (though is not necessarily implemented explicitly as such) and does "
|
|
"not refer to \"distributed shared memory\". This style of shared memory "
|
|
"permits distinct processes to potentially read and write to a common (or "
|
|
"shared) region of volatile memory. Processes are conventionally limited to "
|
|
"only have access to their own process memory space but shared memory permits "
|
|
"the sharing of data between processes, avoiding the need to instead send "
|
|
"messages between processes containing that data. Sharing data directly via "
|
|
"memory can provide significant performance benefits compared to sharing data "
|
|
"via disk or socket or other communications requiring the serialization/"
|
|
"deserialization and copying of data."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:41
|
|
msgid ""
|
|
"Creates a new shared memory block or attaches to an existing shared memory "
|
|
"block. Each shared memory block is assigned a unique name. In this way, one "
|
|
"process can create a shared memory block with a particular name and a "
|
|
"different process can attach to that same shared memory block using that "
|
|
"same name."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:47
|
|
msgid ""
|
|
"As a resource for sharing data across processes, shared memory blocks may "
|
|
"outlive the original process that created them. When one process no longer "
|
|
"needs access to a shared memory block that might still be needed by other "
|
|
"processes, the :meth:`close()` method should be called. When a shared memory "
|
|
"block is no longer needed by any process, the :meth:`unlink()` method should "
|
|
"be called to ensure proper cleanup."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:54
|
|
msgid ""
|
|
"*name* is the unique name for the requested shared memory, specified as a "
|
|
"string. When creating a new shared memory block, if ``None`` (the default) "
|
|
"is supplied for the name, a novel name will be generated."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:58
|
|
msgid ""
|
|
"*create* controls whether a new shared memory block is created (``True``) or "
|
|
"an existing shared memory block is attached (``False``)."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:61
|
|
msgid ""
|
|
"*size* specifies the requested number of bytes when creating a new shared "
|
|
"memory block. Because some platforms choose to allocate chunks of memory "
|
|
"based upon that platform's memory page size, the exact size of the shared "
|
|
"memory block may be larger or equal to the size requested. When attaching "
|
|
"to an existing shared memory block, the ``size`` parameter is ignored."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:69
|
|
msgid ""
|
|
"Closes access to the shared memory from this instance. In order to ensure "
|
|
"proper cleanup of resources, all instances should call ``close()`` once the "
|
|
"instance is no longer needed. Note that calling ``close()`` does not cause "
|
|
"the shared memory block itself to be destroyed."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:77
|
|
msgid ""
|
|
"Requests that the underlying shared memory block be destroyed. In order to "
|
|
"ensure proper cleanup of resources, ``unlink()`` should be called once (and "
|
|
"only once) across all processes which have need for the shared memory "
|
|
"block. After requesting its destruction, a shared memory block may or may "
|
|
"not be immediately destroyed and this behavior may differ across platforms. "
|
|
"Attempts to access data inside the shared memory block after ``unlink()`` "
|
|
"has been called may result in memory access errors. Note: the last process "
|
|
"relinquishing its hold on a shared memory block may call ``unlink()`` and :"
|
|
"meth:`close()` in either order."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:90
|
|
msgid "A memoryview of contents of the shared memory block."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:94
|
|
msgid "Read-only access to the unique name of the shared memory block."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:98
|
|
msgid "Read-only access to size in bytes of the shared memory block."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:101
|
|
msgid ""
|
|
"The following example demonstrates low-level use of :class:`SharedMemory` "
|
|
"instances::"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:127
|
|
msgid ""
|
|
"The following example demonstrates a practical use of the :class:"
|
|
"`SharedMemory` class with `NumPy arrays <https://www.numpy.org/>`_, "
|
|
"accessing the same ``numpy.ndarray`` from two distinct Python shells:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:181
|
|
msgid ""
|
|
"A subclass of :class:`~multiprocessing.managers.BaseManager` which can be "
|
|
"used for the management of shared memory blocks across processes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:184
|
|
msgid ""
|
|
"A call to :meth:`~multiprocessing.managers.BaseManager.start` on a :class:"
|
|
"`SharedMemoryManager` instance causes a new process to be started. This new "
|
|
"process's sole purpose is to manage the life cycle of all shared memory "
|
|
"blocks created through it. To trigger the release of all shared memory "
|
|
"blocks managed by that process, call :meth:`~multiprocessing.managers."
|
|
"BaseManager.shutdown()` on the instance. This triggers a :meth:`SharedMemory."
|
|
"unlink()` call on all of the :class:`SharedMemory` objects managed by that "
|
|
"process and then stops the process itself. By creating ``SharedMemory`` "
|
|
"instances through a ``SharedMemoryManager``, we avoid the need to manually "
|
|
"track and trigger the freeing of shared memory resources."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:196
|
|
msgid ""
|
|
"This class provides methods for creating and returning :class:`SharedMemory` "
|
|
"instances and for creating a list-like object (:class:`ShareableList`) "
|
|
"backed by shared memory."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:200
|
|
msgid ""
|
|
"Refer to :class:`multiprocessing.managers.BaseManager` for a description of "
|
|
"the inherited *address* and *authkey* optional input arguments and how they "
|
|
"may be used to connect to an existing ``SharedMemoryManager`` service from "
|
|
"other processes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:207
|
|
msgid ""
|
|
"Create and return a new :class:`SharedMemory` object with the specified "
|
|
"``size`` in bytes."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:212
|
|
msgid ""
|
|
"Create and return a new :class:`ShareableList` object, initialized by the "
|
|
"values from the input ``sequence``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:216
|
|
msgid ""
|
|
"The following example demonstrates the basic mechanisms of a :class:"
|
|
"`SharedMemoryManager`:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:234
|
|
msgid ""
|
|
"The following example depicts a potentially more convenient pattern for "
|
|
"using :class:`SharedMemoryManager` objects via the :keyword:`with` statement "
|
|
"to ensure that all shared memory blocks are released after they are no "
|
|
"longer needed:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:253
|
|
msgid ""
|
|
"When using a :class:`SharedMemoryManager` in a :keyword:`with` statement, "
|
|
"the shared memory blocks created using that manager are all released when "
|
|
"the :keyword:`with` statement's code block finishes execution."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:260
|
|
msgid ""
|
|
"Provides a mutable list-like object where all values stored within are "
|
|
"stored in a shared memory block. This constrains storable values to only "
|
|
"the ``int``, ``float``, ``bool``, ``str`` (less than 10M bytes each), "
|
|
"``bytes`` (less than 10M bytes each), and ``None`` built-in data types. It "
|
|
"also notably differs from the built-in ``list`` type in that these lists can "
|
|
"not change their overall length (i.e. no append, insert, etc.) and do not "
|
|
"support the dynamic creation of new :class:`ShareableList` instances via "
|
|
"slicing."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:269
|
|
msgid ""
|
|
"*sequence* is used in populating a new ``ShareableList`` full of values. Set "
|
|
"to ``None`` to instead attach to an already existing ``ShareableList`` by "
|
|
"its unique shared memory name."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:273
|
|
msgid ""
|
|
"*name* is the unique name for the requested shared memory, as described in "
|
|
"the definition for :class:`SharedMemory`. When attaching to an existing "
|
|
"``ShareableList``, specify its shared memory block's unique name while "
|
|
"leaving ``sequence`` set to ``None``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:280
|
|
msgid "Returns the number of occurrences of ``value``."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:284
|
|
msgid ""
|
|
"Returns first index position of ``value``. Raises :exc:`ValueError` if "
|
|
"``value`` is not present."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:289
|
|
msgid ""
|
|
"Read-only attribute containing the :mod:`struct` packing format used by all "
|
|
"currently stored values."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:294
|
|
msgid "The :class:`SharedMemory` instance where the values are stored."
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:297
|
|
msgid ""
|
|
"The following example demonstrates basic use of a :class:`ShareableList` "
|
|
"instance:"
|
|
msgstr ""
|
|
|
|
#: ../Doc/library/multiprocessing.shared_memory.rst:330
|
|
msgid ""
|
|
"The following example depicts how one, two, or many processes may access the "
|
|
"same :class:`ShareableList` by supplying the name of the shared memory block "
|
|
"behind it:"
|
|
msgstr ""
|