@@ -719,8 +719,9 @@ For an example of the usage of queues for interprocess communication see
719
719
720
720
.. function :: Pipe([duplex])
721
721
722
- Returns a pair ``(conn1, conn2) `` of :class: `Connection ` objects representing
723
- the ends of a pipe.
722
+ Returns a pair ``(conn1, conn2) `` of
723
+ :class: `~multiprocessing.connection.Connection ` objects representing the
724
+ ends of a pipe.
724
725
725
726
If *duplex * is ``True `` (the default) then the pipe is bidirectional. If
726
727
*duplex * is ``False `` then the pipe is unidirectional: ``conn1 `` can only be
@@ -1005,10 +1006,13 @@ Miscellaneous
1005
1006
Connection Objects
1006
1007
~~~~~~~~~~~~~~~~~~
1007
1008
1009
+ .. currentmodule :: multiprocessing.connection
1010
+
1008
1011
Connection objects allow the sending and receiving of picklable objects or
1009
1012
strings. They can be thought of as message oriented connected sockets.
1010
1013
1011
- Connection objects are usually created using :func: `Pipe ` -- see also
1014
+ Connection objects are usually created using
1015
+ :func: `Pipe <multiprocessing.Pipe> ` -- see also
1012
1016
:ref: `multiprocessing-listeners-clients `.
1013
1017
1014
1018
.. class :: Connection
@@ -1143,6 +1147,8 @@ For example:
1143
1147
Synchronization primitives
1144
1148
~~~~~~~~~~~~~~~~~~~~~~~~~~
1145
1149
1150
+ .. currentmodule :: multiprocessing
1151
+
1146
1152
Generally synchronization primitives are not as necessary in a multiprocess
1147
1153
program as they are in a multithreaded program. See the documentation for
1148
1154
:mod: `threading ` module.
@@ -2253,7 +2259,7 @@ Listeners and Clients
2253
2259
:synopsis: API for dealing with sockets.
2254
2260
2255
2261
Usually message passing between processes is done using queues or by using
2256
- :class: `~multiprocessing. Connection ` objects returned by
2262
+ :class: `~Connection ` objects returned by
2257
2263
:func: `~multiprocessing.Pipe `.
2258
2264
2259
2265
However, the :mod: `multiprocessing.connection ` module allows some extra
@@ -2283,7 +2289,7 @@ multiple connections at the same time.
2283
2289
.. function :: Client(address[, family[, authkey]])
2284
2290
2285
2291
Attempt to set up a connection to the listener which is using address
2286
- *address *, returning a :class: `~multiprocessing. Connection `.
2292
+ *address *, returning a :class: `~Connection `.
2287
2293
2288
2294
The type of the connection is determined by *family * argument, but this can
2289
2295
generally be omitted since it can usually be inferred from the format of
@@ -2333,8 +2339,8 @@ multiple connections at the same time.
2333
2339
.. method :: accept()
2334
2340
2335
2341
Accept a connection on the bound socket or named pipe of the listener
2336
- object and return a :class: `~multiprocessing. Connection ` object. If
2337
- authentication is attempted and fails, then
2342
+ object and return a :class: `~Connection ` object.
2343
+ If authentication is attempted and fails, then
2338
2344
:exc: `~multiprocessing.AuthenticationError ` is raised.
2339
2345
2340
2346
.. method :: close()
@@ -2370,7 +2376,7 @@ multiple connections at the same time.
2370
2376
For both Unix and Windows, an object can appear in *object_list * if
2371
2377
it is
2372
2378
2373
- * a readable :class: `~multiprocessing.Connection ` object;
2379
+ * a readable :class: `~multiprocessing.connection. Connection ` object;
2374
2380
* a connected and readable :class: `socket.socket ` object; or
2375
2381
* the :attr: `~multiprocessing.Process.sentinel ` attribute of a
2376
2382
:class: `~multiprocessing.Process ` object.
@@ -2493,10 +2499,10 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
2493
2499
Authentication keys
2494
2500
~~~~~~~~~~~~~~~~~~~
2495
2501
2496
- When one uses :meth: `Connection.recv <multiprocessing. Connection.recv> `, the
2502
+ When one uses :meth: `Connection.recv <Connection.recv> `, the
2497
2503
data received is automatically
2498
- unpickled. Unfortunately unpickling data from an untrusted source is a security
2499
- risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2504
+ unpickled. Unfortunately unpickling data from an untrusted source is a security
2505
+ risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2500
2506
to provide digest authentication.
2501
2507
2502
2508
An authentication key is a byte string which can be thought of as a
0 commit comments