File tree Expand file tree Collapse file tree 2 files changed +50
-58
lines changed
Expand file tree Collapse file tree 2 files changed +50
-58
lines changed Original file line number Diff line number Diff line change @@ -273,4 +273,53 @@ Helpers
273273Signals
274274=======
275275
276- :ref: `Please refer to Signals <signals >`.
276+ Mitogen contains a simplistic signal mechanism to decouple its components. When
277+ a signal is fired by an instance of a class, functions registered to receive it
278+ are called back.
279+
280+ .. warning ::
281+
282+ As signals execute on the Broker thread, and without exception handling,
283+ they are generally unsafe for consumption by user code, as any bugs could
284+ trigger crashes and hangs for which the broker is unable to forward logs,
285+ or ensure the buggy context always shuts down on disconnect.
286+
287+
288+ Functions
289+ ---------
290+
291+ .. currentmodule :: mitogen.core
292+
293+ .. autofunction :: listen
294+ .. autofunction :: unlisten
295+ .. autofunction :: fire
296+
297+
298+ List
299+ ----
300+
301+ These signals are used internally by Mitogen.
302+
303+ .. list-table ::
304+ :header-rows: 1
305+ :widths: auto
306+
307+ * - Class
308+ - Name
309+ - Description
310+
311+ * - :py:class: `mitogen.core.Stream `
312+ - ``disconnect ``
313+ - Fired on the Broker thread when disconnection is detected.
314+
315+ * - :py:class: `mitogen.core.Context `
316+ - ``disconnect ``
317+ - Fired on the Broker thread during shutdown (???)
318+
319+ * - :py:class: `mitogen.core.Broker `
320+ - ``shutdown ``
321+ - Fired after Broker.shutdown() is called.
322+
323+ * - :py:class: `mitogen.core.Broker `
324+ - ``exit ``
325+ - Fired immediately prior to the broker thread exit.
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments