Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
b674dcf5
Kaydet (Commit)
b674dcf5
authored
Tem 13, 2012
tarafından
Eli Bendersky
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Some fixes for the documentation of multiprocessing (per issue #13686)
üst
e08824c3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
32 additions
and
24 deletions
+32
-24
multiprocessing.rst
Doc/library/multiprocessing.rst
+32
-24
No files found.
Doc/library/multiprocessing.rst
Dosyayı görüntüle @
b674dcf5
...
@@ -305,14 +305,12 @@ The :mod:`multiprocessing` package mostly replicates the API of the
...
@@ -305,14 +305,12 @@ The :mod:`multiprocessing` package mostly replicates the API of the
should always be ``None``; it exists solely for compatibility with
should always be ``None``; it exists solely for compatibility with
:class:`threading.Thread`. *target* is the callable object to be invoked by
:class:`threading.Thread`. *target* is the callable object to be invoked by
the :meth:`run()` method. It defaults to ``None``, meaning nothing is
the :meth:`run()` method. It defaults to ``None``, meaning nothing is
called. *name* is the process name. By default, a unique name is constructed
called. *name* is the process name (see :attr:`name` for more details).
of the form '
Process
-
N
\
:
sub
:`
1
`:
N
\
:
sub
:`
2
`:...:
N
\
:
sub
:`
k
`
' where N\
*args* is the argument tuple for the target invocation. *kwargs* is a
:sub:`1`,N\ :sub:`2`,...,N\ :sub:`k` is a sequence of integers whose length
dictionary of keyword arguments for the target invocation. If provided,
is determined by the *generation* of the process. *args* is the argument
the keyword-only *daemon* argument sets the process :attr:`daemon` flag
tuple for the target invocation. *kwargs* is a dictionary of keyword
to ``True`` or ``False``. If ``None`` (the default), this flag will be
arguments for the target invocation. If provided, the keyword-only *daemon* argument
inherited from the creating process.
sets the process :attr:`daemon` flag to ``True`` or ``False``. If ``None``
(the default), this flag will be inherited from the creating process.
By default, no arguments are passed to *target*.
By default, no arguments are passed to *target*.
...
@@ -352,11 +350,14 @@ The :mod:`multiprocessing` package mostly replicates the API of the
...
@@ -352,11 +350,14 @@ The :mod:`multiprocessing` package mostly replicates the API of the
.. attribute:: name
.. attribute:: name
The process'
s
name
.
The process'
s
name
.
The
name
is
a
string
used
for
identification
purposes
only
.
It
has
no
semantics
.
Multiple
processes
may
be
given
the
same
name
.
The
name
is
a
string
used
for
identification
purposes
only
.
It
has
no
The
initial
name
is
set
by
the
constructor
.
If
no
explicit
name
is
semantics
.
Multiple
processes
may
be
given
the
same
name
.
The
initial
provided
to
the
constructor
,
a
name
of
the
form
name
is
set
by
the
constructor
.
'Process-N\ :sub:`1`:N\ :sub:`2`:...:N\ :sub:`k`'
is
constructed
,
where
each
N
\
:
sub
:`
k
`
is
the
N
-
th
child
of
its
parent
.
..
method
::
is_alive
..
method
::
is_alive
...
@@ -462,6 +463,9 @@ The :mod:`multiprocessing` package mostly replicates the API of the
...
@@ -462,6 +463,9 @@ The :mod:`multiprocessing` package mostly replicates the API of the
>>> p.exitcode == -signal.SIGTERM
>>> p.exitcode == -signal.SIGTERM
True
True
.. exception:: ProcessError
The base class of all :mod:`multiprocessing` exceptions.
.. exception:: BufferTooShort
.. exception:: BufferTooShort
...
@@ -471,6 +475,13 @@ The :mod:`multiprocessing` package mostly replicates the API of the
...
@@ -471,6 +475,13 @@ The :mod:`multiprocessing` package mostly replicates the API of the
If ``e`` is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will give
If ``e`` is an instance of :exc:`BufferTooShort` then ``e.args[0]`` will give
the message as a byte string.
the message as a byte string.
.. exception:: AuthenticationError
Raised when there is an authentication error.
.. exception:: TimeoutError
Raised by methods with a timeout when the timeout expires.
Pipes and Queues
Pipes and Queues
~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~
...
@@ -1838,15 +1849,15 @@ multiple connections at the same time.
...
@@ -1838,15 +1849,15 @@ multiple connections at the same time.
If the reply matches the digest of the message using *authkey* as the key
If the reply matches the digest of the message using *authkey* as the key
then a welcome message is sent to the other end of the connection. Otherwise
then a welcome message is sent to the other end of the connection. Otherwise
:exc:`AuthenticationError` is raised.
:exc:`
~multiprocessing.
AuthenticationError` is raised.
.. function:: answerChallenge(connection, authkey)
.. function:: answerChallenge(connection, authkey)
Receive a message, calculate the digest of the message using *authkey* as the
Receive a message, calculate the digest of the message using *authkey* as the
key, and then send the digest back.
key, and then send the digest back.
If a welcome message is not received, then
:exc:`AuthenticationError` is
If a welcome message is not received, then
raised.
:exc:`~multiprocessing.AuthenticationError` is
raised.
.. function:: Client(address[, family[, authenticate[, authkey]]])
.. function:: Client(address[, family[, authenticate[, authkey]]])
...
@@ -1860,7 +1871,8 @@ multiple connections at the same time.
...
@@ -1860,7 +1871,8 @@ multiple connections at the same time.
If *authenticate* is ``True`` or *authkey* is a string then digest
If *authenticate* is ``True`` or *authkey* is a string then digest
authentication is used. The key used for authentication will be either
authentication is used. The key used for authentication will be either
*authkey* or ``current_process().authkey)`` if *authkey* is ``None``.
*authkey* or ``current_process().authkey)`` if *authkey* is ``None``.
If authentication fails then :exc:`AuthenticationError` is raised. See
If authentication fails then
:exc:`~multiprocessing.AuthenticationError` is raised. See
:ref:`multiprocessing-auth-keys`.
:ref:`multiprocessing-auth-keys`.
.. class:: Listener([address[, family[, backlog[, authenticate[, authkey]]]]])
.. class:: Listener([address[, family[, backlog[, authenticate[, authkey]]]]])
...
@@ -1901,13 +1913,15 @@ multiple connections at the same time.
...
@@ -1901,13 +1913,15 @@ multiple connections at the same time.
``current_process().authkey`` is used as the authentication key. If
``current_process().authkey`` is used as the authentication key. If
*authkey* is ``None`` and *authenticate* is ``False`` then no
*authkey* is ``None`` and *authenticate* is ``False`` then no
authentication is done. If authentication fails then
authentication is done. If authentication fails then
:exc:`AuthenticationError` is raised. See :ref:`multiprocessing-auth-keys`.
:exc:`~multiprocessing.AuthenticationError` is raised.
See :ref:`multiprocessing-auth-keys`.
.. method:: accept()
.. method:: accept()
Accept a connection on the bound socket or named pipe of the listener
Accept a connection on the bound socket or named pipe of the listener
object and return a :class:`Connection` object. If authentication is
object and return a :class:`Connection` object. If authentication is
attempted and fails, then :exc:`AuthenticationError` is raised.
attempted and fails, then
:exc:`~multiprocessing.AuthenticationError` is raised.
.. method:: close()
.. method:: close()
...
@@ -1965,12 +1979,6 @@ multiple connections at the same time.
...
@@ -1965,12 +1979,6 @@ multiple connections at the same time.
.. versionadded:: 3.3
.. versionadded:: 3.3
The module defines two exceptions:
.. exception:: AuthenticationError
Exception raised when there is an authentication error.
**Examples**
**Examples**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment