Commit 9372d2c3 authored by David Wilson's avatar David Wilson

docs: Fix up tons of references, document trust chain

parent 05128543
...@@ -32,21 +32,22 @@ bootstrap implementation sent to every new slave context. ...@@ -32,21 +32,22 @@ bootstrap implementation sent to every new slave context.
Decorator that marks a function or class method to automatically receive a Decorator that marks a function or class method to automatically receive a
kwarg named `econtext`, referencing the kwarg named `econtext`, referencing the
:py:class:`econtext.core.ExternalContext` active in the context in which :py:class:`mitogen.core.ExternalContext` active in the context in which the
the function is being invoked in. The decorator is only meaningful when the function is being invoked in. The decorator is only meaningful when the
function is invoked via :py:data:`econtext.core.CALL_FUNCTION`. function is invoked via :py:data:`CALL_FUNCTION
<mitogen.core.CALL_FUNCTION>`.
When the function is invoked directly, `econtext` must still be passed to it When the function is invoked directly, `econtext` must still be passed to
explicitly. it explicitly.
.. currentmodule:: mitogen.core .. currentmodule:: mitogen.core
.. decorator:: takes_router .. decorator:: takes_router
Decorator that marks a function or class method to automatically receive a Decorator that marks a function or class method to automatically receive a
kwarg named `router`, referencing the :py:class:`econtext.core.Router` kwarg named `router`, referencing the :py:class:`mitogen.core.Router`
active in the context in which the function is being invoked in. The active in the context in which the function is being invoked in. The
decorator is only meaningful when the function is invoked via decorator is only meaningful when the function is invoked via
:py:data:`econtext.core.CALL_FUNCTION`. :py:data:`CALL_FUNCTION <mitogen.core.CALL_FUNCTION>`.
When the function is invoked directly, `router` must still be passed to it When the function is invoked directly, `router` must still be passed to it
explicitly. explicitly.
...@@ -269,8 +270,9 @@ Router Class ...@@ -269,8 +270,9 @@ Router Class
.. class:: Router .. class:: Router
Route messages between parent and child contexts, and invoke handlers Route messages between parent and child contexts, and invoke handlers
defined on our parent context. Router.route() straddles the Broker and user defined on our parent context. :py:meth:`Router.route() <route>` straddles
threads, it is safe to call anywhere. the :py:class:`Broker <mitogen.core.Broker>` and user threads, it is safe
to call anywhere.
**Note:** This is the somewhat limited core version of the Router class **Note:** This is the somewhat limited core version of the Router class
used by child contexts. The master subclass is documented below this one. used by child contexts. The master subclass is documented below this one.
...@@ -312,8 +314,8 @@ Router Class ...@@ -312,8 +314,8 @@ Router Class
:param mitogen.core.Context respondent: :param mitogen.core.Context respondent:
Context that messages to this handle are expected to be sent from. Context that messages to this handle are expected to be sent from.
If specified, arranges for ``_DEAD`` to be delivered to `fn` when If specified, arranges for :py:data:`_DEAD` to be delivered to `fn`
disconncetion of the context is detected. when disconnection of the context is detected.
In future `respondent` will likely also be used to prevent other In future `respondent` will likely also be used to prevent other
contexts from sending messages to the handle. contexts from sending messages to the handle.
...@@ -635,9 +637,9 @@ Receiver Class ...@@ -635,9 +637,9 @@ Receiver Class
:param mitogen.core.Context respondent: :param mitogen.core.Context respondent:
Reference to the context this receiver is receiving from. If not Reference to the context this receiver is receiving from. If not
``None``, arranges for the receiver to receive ``None``, arranges for the receiver to receive :py:data:`_DEAD` if
:py:data:`mitogen.core._DEAD` if messages can no longer be routed to messages can no longer be routed to the context, due to disconnection
the context, due to disconnection or exit. or exit.
.. attribute:: notify = None .. attribute:: notify = None
...@@ -718,7 +720,7 @@ Sender Class ...@@ -718,7 +720,7 @@ Sender Class
.. py:method:: close () .. py:method:: close ()
Send :py:data:`mitogen.core._DEAD` to the remote end, causing Send :py:data:`_DEAD` to the remote end, causing
:py:meth:`ChannelError` to be raised in any waiting thread. :py:meth:`ChannelError` to be raised in any waiting thread.
.. py:method:: put (data) .. py:method:: put (data)
...@@ -745,12 +747,15 @@ Channel Class ...@@ -745,12 +747,15 @@ Channel Class
Broker Class Broker Class
============ ============
.. currentmodule:: mitogen.master .. currentmodule:: mitogen.core
.. autoclass:: Broker .. autoclass:: Broker
:members: :members:
:inherited-members: :inherited-members:
.. currentmodule:: mitogen.master
.. autoclass:: Broker
:members:
Utility Functions Utility Functions
================= =================
......
This diff is collapsed.
...@@ -162,6 +162,13 @@ Other Stream Subclasses ...@@ -162,6 +162,13 @@ Other Stream Subclasses
:members: :members:
Importer Class
--------------
.. currentmodule:: mitogen.core
.. autoclass:: Importer
:members:
ExternalContext Class ExternalContext Class
--------------------- ---------------------
...@@ -201,6 +208,9 @@ ExternalContext Class ...@@ -201,6 +208,9 @@ ExternalContext Class
The :py:class:`IoLogger` connected to ``stderr``. The :py:class:`IoLogger` connected to ``stderr``.
.. method:: _dispatch_calls
Implementation for the main thread in every child context.
mitogen.master mitogen.master
============== ==============
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment