From 27175e312619d9738da8db566604316e9eb5d5e2 Mon Sep 17 00:00:00 2001 From: David Wilson Date: Fri, 23 Mar 2018 16:52:54 +0545 Subject: [PATCH] docs: tidy up signals.rst a little. --- docs/signals.rst | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/docs/signals.rst b/docs/signals.rst index a7548ac9..312cbc5e 100644 --- a/docs/signals.rst +++ b/docs/signals.rst @@ -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