Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarifications to docs #346

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions docs/reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -790,7 +790,8 @@ foreign libraries. Use the following functions to do that:
.. asyncfunction:: run_in_process(callable, *args)

Run ``callable(*args)`` in a separate process and returns the
result. If cancelled, the underlying worker process is immediately
function's result (not the process exit code). If cancelled,
the underlying worker process is immediately
cancelled by a ``SIGTERM`` signal. The given callable executes in
an entirely independent Python interpreter and there is no shared
global state. The separate process is launched using the "spawn"
Expand Down Expand Up @@ -1196,12 +1197,14 @@ The following methods are used to establish a connection on a :class:`Channel` i
:header-rows: 0

* - ``await ch.accept(*, authkey=None)``
- Wait for an incoming connection and return a
- Wait for an authenticated incoming connection and return a
:class:`Connection` instance. *authkey* is an optional
authentication key.
authentication key. Connections failing authentication are logged
and dropped.
* - ``await ch.connect(*, authkey=None)``
- Make an outgoing connection and return a :class:`Connection` instance.
*authkey* is an optional authentication key.
*authkey* is an optional authentication key. Raise AuthenticationError
if authentication fails.
* - ``ch.bind()``
- Performs the address binding step of the ``accept()`` method.
Use this to have the host operating system to assign a port
Expand All @@ -1210,6 +1213,9 @@ The following methods are used to establish a connection on a :class:`Channel` i
* - ``await ch.close()``
- Close the channel.

:class:`Channel` supports the asynchronous context manager protocol to call ``close()`` on
leaving the context.

The ``connect()`` and ``accept()`` methods of :class:`Channel` instances return an
instance of the :class:`Connection` class:

Expand Down