summaryrefslogtreecommitdiffstats
path: root/Doc/library/multiprocessing.rst
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2009-01-03 22:47:39 (GMT)
committerGeorg Brandl <georg@python.org>2009-01-03 22:47:39 (GMT)
commit1f01debe6f94d7f178e14ee7417786461b724e96 (patch)
treef092e467dbf9846ec29f59e626f4d50eb1b2b8c1 /Doc/library/multiprocessing.rst
parent814a2ca9e4b6360f1de37ed3d8d8d4313ab333bc (diff)
downloadcpython-1f01debe6f94d7f178e14ee7417786461b724e96.zip
cpython-1f01debe6f94d7f178e14ee7417786461b724e96.tar.gz
cpython-1f01debe6f94d7f178e14ee7417786461b724e96.tar.bz2
Merged revisions 68162,68166,68171,68176,68195-68196,68210,68232 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r68162 | ronald.oussoren | 2009-01-02 16:06:00 +0100 (Fri, 02 Jan 2009) | 3 lines Fix for issue 4472 is incompatible with Cygwin, this patch should fix that. ........ r68166 | benjamin.peterson | 2009-01-02 19:26:23 +0100 (Fri, 02 Jan 2009) | 1 line document PyMemberDef ........ r68171 | georg.brandl | 2009-01-02 21:25:14 +0100 (Fri, 02 Jan 2009) | 3 lines #4811: fix markup glitches (mostly remains of the conversion), found by Gabriel Genellina. ........ r68176 | andrew.kuchling | 2009-01-02 22:00:35 +0100 (Fri, 02 Jan 2009) | 1 line Add various items ........ r68195 | georg.brandl | 2009-01-03 14:45:15 +0100 (Sat, 03 Jan 2009) | 2 lines Remove useless string literal. ........ r68196 | georg.brandl | 2009-01-03 15:29:53 +0100 (Sat, 03 Jan 2009) | 2 lines Fix indentation. ........ r68210 | georg.brandl | 2009-01-03 20:10:12 +0100 (Sat, 03 Jan 2009) | 2 lines Set eol-style correctly for mp_distributing.py. ........ r68232 | georg.brandl | 2009-01-03 22:52:16 +0100 (Sat, 03 Jan 2009) | 2 lines Grammar fix. ........
Diffstat (limited to 'Doc/library/multiprocessing.rst')
-rw-r--r--Doc/library/multiprocessing.rst30
1 files changed, 15 insertions, 15 deletions
diff --git a/Doc/library/multiprocessing.rst b/Doc/library/multiprocessing.rst
index e5dd1ed..6334d32 100644
--- a/Doc/library/multiprocessing.rst
+++ b/Doc/library/multiprocessing.rst
@@ -107,12 +107,12 @@ processes:
def f(q):
q.put([42, None, 'hello'])
- if __name__ == '__main__':
- q = Queue()
- p = Process(target=f, args=(q,))
- p.start()
- print(q.get()) # prints "[42, None, 'hello']"
- p.join()
+ if __name__ == '__main__':
+ q = Queue()
+ p = Process(target=f, args=(q,))
+ p.start()
+ print(q.get()) # prints "[42, None, 'hello']"
+ p.join()
Queues are thread and process safe.
@@ -1136,18 +1136,18 @@ their parent process exits. The manager classes are defined in the
Returns a :class:`Server` object which represents the actual server under
the control of the Manager. The :class:`Server` object supports the
- :meth:`serve_forever` method::
+ :meth:`serve_forever` method:
- >>> from multiprocessing.managers import BaseManager
- >>> m = BaseManager(address=('', 50000), authkey='abc'))
- >>> server = m.get_server()
- >>> s.serve_forever()
+ >>> from multiprocessing.managers import BaseManager
+ >>> m = BaseManager(address=('', 50000), authkey='abc'))
+ >>> server = m.get_server()
+ >>> s.serve_forever()
- :class:`Server` additionally have an :attr:`address` attribute.
+ :class:`Server` additionally have an :attr:`address` attribute.
.. method:: connect()
- Connect a local manager object to a remote manager process::
+ Connect a local manager object to a remote manager process:
>>> from multiprocessing.managers import BaseManager
>>> m = BaseManager(address='127.0.0.1', authkey='abc))
@@ -1293,7 +1293,7 @@ Customized managers
>>>>>>>>>>>>>>>>>>>
To create one's own manager, one creates a subclass of :class:`BaseManager` and
-use the :meth:`~BaseManager.resgister` classmethod to register new types or
+use the :meth:`~BaseManager.register` classmethod to register new types or
callables with the manager class. For example::
from multiprocessing.managers import BaseManager
@@ -1809,7 +1809,7 @@ Address Formats
* An ``'AF_PIPE'`` address is a string of the form
:samp:`r'\\\\.\\pipe\\{PipeName}'`. To use :func:`Client` to connect to a named
- pipe on a remote computer called ServerName* one should use an address of the
+ pipe on a remote computer called *ServerName* one should use an address of the
form :samp:`r'\\\\{ServerName}\\pipe\\{PipeName}'`` instead.
Note that any string beginning with two backslashes is assumed by default to be