docs: tidy up signals.rst a little.

This commit is contained in:
David Wilson 2018-03-23 16:52:54 +05:45
parent a956aa409e
commit 27175e3126
1 changed files with 24 additions and 0 deletions

View File

@ -2,6 +2,30 @@
Signals
=======
Mitogen exposes a simplistic signal mechanism to help decouple its internal
components. When a signal is fired by a particular instance of a class, any
functions registered to receive it will be called back.
Functions
---------
.. function:: mitogen.core.listen (obj, name, func)
Arrange for `func(\*args, \*\*kwargs)` to be invoked when the named signal
is fired by `obj`.
.. function:: mitogen.core.fire (obj, name, \*args, \*\*kwargs)
Arrange for `func(\*args, \*\*kwargs)` to be invoked for every function
registered for the named signal on `obj`.
List
----
These signals are used internally by Mitogen.
.. list-table::
:header-rows: 1