@@ -574,8 +574,9 @@ For an example of the usage of queues for interprocess communication see
574
574
575
575
.. function :: Pipe([duplex])
576
576
577
- Returns a pair ``(conn1, conn2) `` of :class: `Connection ` objects representing
578
- the ends of a pipe.
577
+ Returns a pair ``(conn1, conn2) `` of
578
+ :class: `~multiprocessing.connection.Connection ` objects representing the
579
+ ends of a pipe.
579
580
580
581
If *duplex * is ``True `` (the default) then the pipe is bidirectional. If
581
582
*duplex * is ``False `` then the pipe is unidirectional: ``conn1 `` can only be
@@ -803,10 +804,13 @@ Miscellaneous
803
804
Connection Objects
804
805
~~~~~~~~~~~~~~~~~~
805
806
807
+ .. currentmodule :: multiprocessing.connection
808
+
806
809
Connection objects allow the sending and receiving of picklable objects or
807
810
strings. They can be thought of as message oriented connected sockets.
808
811
809
- Connection objects are usually created using :func: `Pipe ` -- see also
812
+ Connection objects are usually created using
813
+ :func: `Pipe <multiprocessing.Pipe> ` -- see also
810
814
:ref: `multiprocessing-listeners-clients `.
811
815
812
816
.. class :: Connection
@@ -926,6 +930,8 @@ For example:
926
930
Synchronization primitives
927
931
~~~~~~~~~~~~~~~~~~~~~~~~~~
928
932
933
+ .. currentmodule :: multiprocessing
934
+
929
935
Generally synchronization primitives are not as necessary in a multiprocess
930
936
program as they are in a multithreaded program. See the documentation for
931
937
:mod: `threading ` module.
@@ -1943,7 +1949,7 @@ Listeners and Clients
1943
1949
:synopsis: API for dealing with sockets.
1944
1950
1945
1951
Usually message passing between processes is done using queues or by using
1946
- :class: `~multiprocessing. Connection ` objects returned by
1952
+ :class: `~Connection ` objects returned by
1947
1953
:func: `~multiprocessing.Pipe `.
1948
1954
1949
1955
However, the :mod: `multiprocessing.connection ` module allows some extra
@@ -1972,7 +1978,7 @@ authentication* using the :mod:`hmac` module.
1972
1978
.. function :: Client(address[, family[, authenticate[, authkey]]])
1973
1979
1974
1980
Attempt to set up a connection to the listener which is using address
1975
- *address *, returning a :class: `~multiprocessing. Connection `.
1981
+ *address *, returning a :class: `~Connection `.
1976
1982
1977
1983
The type of the connection is determined by *family * argument, but this can
1978
1984
generally be omitted since it can usually be inferred from the format of
@@ -2028,8 +2034,8 @@ authentication* using the :mod:`hmac` module.
2028
2034
.. method :: accept()
2029
2035
2030
2036
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
2037
+ object and return a :class: `~Connection ` object.
2038
+ If authentication is attempted and fails, then
2033
2039
:exc: `~multiprocessing.AuthenticationError ` is raised.
2034
2040
2035
2041
.. method :: close()
@@ -2126,10 +2132,10 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
2126
2132
Authentication keys
2127
2133
~~~~~~~~~~~~~~~~~~~
2128
2134
2129
- When one uses :meth: `Connection.recv <multiprocessing. Connection.recv> `, the
2135
+ When one uses :meth: `Connection.recv <Connection.recv> `, the
2130
2136
data received is automatically
2131
- unpickled. Unfortunately unpickling data from an untrusted source is a security
2132
- risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2137
+ unpickled. Unfortunately unpickling data from an untrusted source is a security
2138
+ risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2133
2139
to provide digest authentication.
2134
2140
2135
2141
An authentication key is a string which can be thought of as a password: once a
0 commit comments