@@ -803,10 +803,13 @@ Miscellaneous
803
803
Connection Objects
804
804
~~~~~~~~~~~~~~~~~~
805
805
806
+ .. currentmodule :: None
807
+
806
808
Connection objects allow the sending and receiving of picklable objects or
807
809
strings. They can be thought of as message oriented connected sockets.
808
810
809
- Connection objects are usually created using :func: `Pipe ` -- see also
811
+ Connection objects are usually created using
812
+ :func: `Pipe <multiprocessing.Pipe> ` -- see also
810
813
:ref: `multiprocessing-listeners-clients `.
811
814
812
815
.. class :: Connection
@@ -926,6 +929,8 @@ For example:
926
929
Synchronization primitives
927
930
~~~~~~~~~~~~~~~~~~~~~~~~~~
928
931
932
+ .. currentmodule :: multiprocessing
933
+
929
934
Generally synchronization primitives are not as necessary in a multiprocess
930
935
program as they are in a multithreaded program. See the documentation for
931
936
:mod: `threading ` module.
@@ -1943,8 +1948,7 @@ Listeners and Clients
1943
1948
:synopsis: API for dealing with sockets.
1944
1949
1945
1950
Usually message passing between processes is done using queues or by using
1946
- :class: `~multiprocessing.Connection ` objects returned by
1947
- :func: `~multiprocessing.Pipe `.
1951
+ :class: `Connection ` objects returned by :func: `~multiprocessing.Pipe `.
1948
1952
1949
1953
However, the :mod: `multiprocessing.connection ` module allows some extra
1950
1954
flexibility. It basically gives a high level message oriented API for dealing
@@ -1972,7 +1976,7 @@ authentication* using the :mod:`hmac` module.
1972
1976
.. function :: Client(address[, family[, authenticate[, authkey]]])
1973
1977
1974
1978
Attempt to set up a connection to the listener which is using address
1975
- *address *, returning a :class: `~multiprocessing. Connection `.
1979
+ *address *, returning a :class: `Connection `.
1976
1980
1977
1981
The type of the connection is determined by *family * argument, but this can
1978
1982
generally be omitted since it can usually be inferred from the format of
@@ -2028,8 +2032,8 @@ authentication* using the :mod:`hmac` module.
2028
2032
.. method :: accept()
2029
2033
2030
2034
Accept a connection on the bound socket or named pipe of the listener
2031
- object and return a :class: `~multiprocessing. Connection ` object. If
2032
- authentication is attempted and fails, then
2035
+ object and return a :class: `Connection ` object.
2036
+ If authentication is attempted and fails, then
2033
2037
:exc: `~multiprocessing.AuthenticationError ` is raised.
2034
2038
2035
2039
.. method :: close()
@@ -2139,7 +2143,7 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
2139
2143
Authentication keys
2140
2144
~~~~~~~~~~~~~~~~~~~
2141
2145
2142
- When one uses :meth: `Connection.recv <multiprocessing.Connection.recv> `, the
2146
+ When one uses :meth: `Connection.recv `, the
2143
2147
data received is automatically
2144
2148
unpickled. Unfortunately unpickling data from an untrusted source is a security
2145
2149
risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
0 commit comments