Skip to content
Merged
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
8 changes: 8 additions & 0 deletions Doc/library/asyncio-eventloop.rst
Original file line number Diff line number Diff line change
Expand Up @@ -966,12 +966,20 @@ Unix signals

Set *callback* as the handler for the *signum* signal.

The callback will be invoked by *loop*, along with other queued callbacks
and runnable coroutines of that event loop. Unlike signal handlers
registered using :func:`signal.signal`, a callback registered with this
function is allowed to interact with the event loop.

Raise :exc:`ValueError` if the signal number is invalid or uncatchable.
Raise :exc:`RuntimeError` if there is a problem setting up the handler.

Use :func:`functools.partial` :ref:`to pass keyword arguments
<asyncio-pass-keywords>` to *callback*.

Like :func:`signal.signal`, this function must be invoked in the main
thread.

.. method:: loop.remove_signal_handler(sig)

Remove the handler for the *sig* signal.
Expand Down