@@ -735,8 +735,9 @@ For an example of the usage of queues for interprocess communication see
735
735
736
736
.. function :: Pipe([duplex])
737
737
738
- Returns a pair ``(conn1, conn2) `` of :class: `Connection ` objects representing
739
- the ends of a pipe.
738
+ Returns a pair ``(conn1, conn2) `` of
739
+ :class: `~multiprocessing.connection.Connection ` objects representing the
740
+ ends of a pipe.
740
741
741
742
If *duplex * is ``True `` (the default) then the pipe is bidirectional. If
742
743
*duplex * is ``False `` then the pipe is unidirectional: ``conn1 `` can only be
@@ -1021,10 +1022,13 @@ Miscellaneous
1021
1022
Connection Objects
1022
1023
~~~~~~~~~~~~~~~~~~
1023
1024
1025
+ .. currentmodule :: multiprocessing.connection
1026
+
1024
1027
Connection objects allow the sending and receiving of picklable objects or
1025
1028
strings. They can be thought of as message oriented connected sockets.
1026
1029
1027
- Connection objects are usually created using :func: `Pipe ` -- see also
1030
+ Connection objects are usually created using
1031
+ :func: `Pipe <multiprocessing.Pipe> ` -- see also
1028
1032
:ref: `multiprocessing-listeners-clients `.
1029
1033
1030
1034
.. class :: Connection
@@ -1159,6 +1163,8 @@ For example:
1159
1163
Synchronization primitives
1160
1164
~~~~~~~~~~~~~~~~~~~~~~~~~~
1161
1165
1166
+ .. currentmodule :: multiprocessing
1167
+
1162
1168
Generally synchronization primitives are not as necessary in a multiprocess
1163
1169
program as they are in a multithreaded program. See the documentation for
1164
1170
:mod: `threading ` module.
@@ -2269,7 +2275,7 @@ Listeners and Clients
2269
2275
:synopsis: API for dealing with sockets.
2270
2276
2271
2277
Usually message passing between processes is done using queues or by using
2272
- :class: `~multiprocessing. Connection ` objects returned by
2278
+ :class: `~Connection ` objects returned by
2273
2279
:func: `~multiprocessing.Pipe `.
2274
2280
2275
2281
However, the :mod: `multiprocessing.connection ` module allows some extra
@@ -2299,7 +2305,7 @@ multiple connections at the same time.
2299
2305
.. function :: Client(address[, family[, authkey]])
2300
2306
2301
2307
Attempt to set up a connection to the listener which is using address
2302
- *address *, returning a :class: `~multiprocessing. Connection `.
2308
+ *address *, returning a :class: `~Connection `.
2303
2309
2304
2310
The type of the connection is determined by *family * argument, but this can
2305
2311
generally be omitted since it can usually be inferred from the format of
@@ -2349,8 +2355,8 @@ multiple connections at the same time.
2349
2355
.. method :: accept()
2350
2356
2351
2357
Accept a connection on the bound socket or named pipe of the listener
2352
- object and return a :class: `~multiprocessing. Connection ` object. If
2353
- authentication is attempted and fails, then
2358
+ object and return a :class: `~Connection ` object.
2359
+ If authentication is attempted and fails, then
2354
2360
:exc: `~multiprocessing.AuthenticationError ` is raised.
2355
2361
2356
2362
.. method :: close()
@@ -2386,7 +2392,7 @@ multiple connections at the same time.
2386
2392
For both Unix and Windows, an object can appear in *object_list * if
2387
2393
it is
2388
2394
2389
- * a readable :class: `~multiprocessing.Connection ` object;
2395
+ * a readable :class: `~multiprocessing.connection. Connection ` object;
2390
2396
* a connected and readable :class: `socket.socket ` object; or
2391
2397
* the :attr: `~multiprocessing.Process.sentinel ` attribute of a
2392
2398
:class: `~multiprocessing.Process ` object.
@@ -2509,10 +2515,10 @@ an ``'AF_PIPE'`` address rather than an ``'AF_UNIX'`` address.
2509
2515
Authentication keys
2510
2516
~~~~~~~~~~~~~~~~~~~
2511
2517
2512
- When one uses :meth: `Connection.recv <multiprocessing. Connection.recv> `, the
2518
+ When one uses :meth: `Connection.recv <Connection.recv> `, the
2513
2519
data received is automatically
2514
- unpickled. Unfortunately unpickling data from an untrusted source is a security
2515
- risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2520
+ unpickled. Unfortunately unpickling data from an untrusted source is a security
2521
+ risk. Therefore :class: `Listener ` and :func: `Client ` use the :mod: `hmac ` module
2516
2522
to provide digest authentication.
2517
2523
2518
2524
An authentication key is a byte string which can be thought of as a
0 commit comments