PyDocs

Nav

Concurrent Execution

Connection

  • Connection(handle, readable=True, writable=True)
Connection class based on an arbitrary file descriptor (Unix only), or
a socket handle (Windows).
Changed in 3.3
  • 3.3: Connection objects themselves can now be transferred between processes using Connection.send() and Connection.recv(). Connection objects also now support the context management protocol – see Context Manager Types. __enter__() returns the connection object, and __exit__() calls close().
Members of Connection

c

close
Close the connection

f

fileno
File descriptor or handle of the connection

p

poll
Whether there is any input available to be read

r

recv
Receive a (picklable) object
recv_bytes
Receive bytes data as a bytes object.
recv_bytes_into
Receive bytes data into a writeable bytes-like object.

s

send
Send a (picklable) object
send_bytes
Send the bytes data from a bytes-like object
0 Examples
No examples for multiprocessing.connection/Connection.
See Also
No see-alsos for multiprocessing.connection/Connection
0 Notes
No notes for Connection