|
|
@ -792,8 +792,8 @@ Context Class
|
|
|
|
|
|
|
|
|
|
|
|
.. method:: send (msg)
|
|
|
|
.. method:: send (msg)
|
|
|
|
|
|
|
|
|
|
|
|
Arrange for `msg` to be delivered to this context. Updates the
|
|
|
|
Arrange for `msg` to be delivered to this context.
|
|
|
|
message's `dst_id` prior to routing it via the associated router.
|
|
|
|
:attr:`dst_id <Message.dst_id>` is set to the target context ID.
|
|
|
|
|
|
|
|
|
|
|
|
:param mitogen.core.Message msg:
|
|
|
|
:param mitogen.core.Message msg:
|
|
|
|
The message.
|
|
|
|
The message.
|
|
|
@ -801,9 +801,9 @@ Context Class
|
|
|
|
.. method:: send_async (msg, persist=False)
|
|
|
|
.. method:: send_async (msg, persist=False)
|
|
|
|
|
|
|
|
|
|
|
|
Arrange for `msg` to be delivered to this context, with replies
|
|
|
|
Arrange for `msg` to be delivered to this context, with replies
|
|
|
|
delivered to a newly constructed Receiver. Updates the message's
|
|
|
|
directed to a newly constructed receiver. :attr:`dst_id
|
|
|
|
`dst_id` prior to routing it via the associated router and registers a
|
|
|
|
<Message.dst_id>` is set to the target context ID, and :attr:`reply_to
|
|
|
|
handle which is placed in the message's `reply_to`.
|
|
|
|
<Message.reply_to>` is set to the newly constructed receiver's handle.
|
|
|
|
|
|
|
|
|
|
|
|
:param bool persist:
|
|
|
|
:param bool persist:
|
|
|
|
If :data:`False`, the handler will be unregistered after a single
|
|
|
|
If :data:`False`, the handler will be unregistered after a single
|
|
|
@ -818,15 +818,15 @@ Context Class
|
|
|
|
|
|
|
|
|
|
|
|
.. method:: send_await (msg, deadline=None)
|
|
|
|
.. method:: send_await (msg, deadline=None)
|
|
|
|
|
|
|
|
|
|
|
|
As with :meth:`send_async`, but expect a single reply
|
|
|
|
Like :meth:`send_async`, but expect a single reply (`persist=False`)
|
|
|
|
(`persist=False`) delivered within `deadline` seconds.
|
|
|
|
delivered within `deadline` seconds.
|
|
|
|
|
|
|
|
|
|
|
|
:param mitogen.core.Message msg:
|
|
|
|
:param mitogen.core.Message msg:
|
|
|
|
The message.
|
|
|
|
The message.
|
|
|
|
|
|
|
|
|
|
|
|
:param float deadline:
|
|
|
|
:param float deadline:
|
|
|
|
If not :data:`None`, seconds before timing out waiting for a reply.
|
|
|
|
If not :data:`None`, seconds before timing out waiting for a reply.
|
|
|
|
|
|
|
|
:returns:
|
|
|
|
|
|
|
|
The deserialized reply.
|
|
|
|
:raises mitogen.core.TimeoutError:
|
|
|
|
:raises mitogen.core.TimeoutError:
|
|
|
|
No message was received and `deadline` passed.
|
|
|
|
No message was received and `deadline` passed.
|
|
|
|
|
|
|
|
|
|
|
@ -838,9 +838,9 @@ Context Class
|
|
|
|
|
|
|
|
|
|
|
|
.. class:: Context
|
|
|
|
.. class:: Context
|
|
|
|
|
|
|
|
|
|
|
|
Extend :class:`mitogen.core.Router` with functionality useful to
|
|
|
|
Extend :class:`mitogen.core.Context` with functionality useful to masters,
|
|
|
|
masters, and child contexts who later become parents. Currently when this
|
|
|
|
and child contexts who later become parents. Currently when this class is
|
|
|
|
class is required, the target context's router is upgraded at runtime.
|
|
|
|
required, the target context's router is upgraded at runtime.
|
|
|
|
|
|
|
|
|
|
|
|
.. attribute:: default_call_chain
|
|
|
|
.. attribute:: default_call_chain
|
|
|
|
|
|
|
|
|
|
|
@ -1196,7 +1196,7 @@ Broker Class
|
|
|
|
Responsible for handling I/O multiplexing in a private thread.
|
|
|
|
Responsible for handling I/O multiplexing in a private thread.
|
|
|
|
|
|
|
|
|
|
|
|
**Note:** This is the somewhat limited core version of the Broker class
|
|
|
|
**Note:** This is the somewhat limited core version of the Broker class
|
|
|
|
used by child contexts. The master subclass is documented below this one.
|
|
|
|
used by child contexts. The master subclass is documented below.
|
|
|
|
|
|
|
|
|
|
|
|
.. attribute:: shutdown_timeout = 3.0
|
|
|
|
.. attribute:: shutdown_timeout = 3.0
|
|
|
|
|
|
|
|
|
|
|
|