docs: document one more.

pull/350/head
David Wilson 6 years ago
parent df5342af22
commit ec8d759d46

@ -338,6 +338,9 @@ Helper Functions
.. autofunction:: set_block
.. autofunction:: io_op
.. currentmodule:: mitogen.parent
.. autofunction:: close_nonstandard_fds
.. autofunction:: create_socketpair
.. currentmodule:: mitogen.master
.. autofunction:: get_child_modules

@ -157,6 +157,14 @@ def close_nonstandard_fds():
def create_socketpair():
"""
Create a :func:`socket.socketpair` to use for use as a child process's UNIX
stdio channels. As socket pairs are bidirectional, they are economical on
file descriptor usage as the same descriptor can be used for ``stdin`` and
``stdout``. As they are sockets their buffers are tunable, allowing large
buffers to be configured in order to improve throughput for file transfers
and reduce :class:`mitogen.core.Broker` IO loop iterations.
"""
parentfp, childfp = socket.socketpair()
parentfp.setsockopt(socket.SOL_SOCKET,
socket.SO_SNDBUF,

Loading…
Cancel
Save