Commit Graph

24 Commits (3a07ed3d653eb4cc18a2c0e688ab3f6c3cd27748)

Author SHA1 Message Date
David Wilson 7c88e4d013 Move _DEAD into header, autogenerate dead messages
This change blocks off 2 common scenarios where a race condition is
upgraded to a hang, when the library could internally do better.

* Since we don't know whether the receiver of a `reply_to` is expecting
  a raw or pickled message, and since in the case of a raw reply, there
  is no way to signal "dead" to the receiver, override the reply_to
  field to explicitly mark a message as dead using a special handle.

  This replaces the serialized _DEAD sentinel value with a slightly
  neater interface, in the form of the reserved IS_DEAD handle, and
  enables an important subsequent change: when a context cannot route a
  message, it can send a generic 'dead' reply back towards the message
  source, ensuring any sleeping thread is woken with ChannelError.

  The use of this field could potentially be extended later on if
  additional flags are needed, but for now this seems to suffice.

* Teach Router._invoke() to reply with a dead message when it receives a
  message for an invalid local handle.

* Teach Router._async_route() to reply with a dead message when it
  receives an unroutable message.
7 years ago
David Wilson 6958b8ff09 docs: More getting started. 7 years ago
David Wilson bbb0f1bbd8 issue #155: fix double-fork behaviour and test it this time. 7 years ago
David Wilson b48d63f33b docs: add to_sender() and update serialization notes 7 years ago
David Wilson 732a610246 docs: add beginnings of section on func decorators 7 years ago
David Wilson 91116810a1 ansible: delete utils.py and promote cast() to mitogen.utils 7 years ago
David Wilson 18eaf14dca ansible: migrate logging variables into utils. 7 years ago
Alex Willmer eb1ad66469 docs: Fix out of date get_data() snippets
As of adc8fe3aed Receiver objects do not
have a get_data() method and Receiver.get() does not unpickle the
message.
7 years ago
David Wilson 58102c8179 docs: waiting on multiple calls 7 years ago
David Wilson fb759f7c16 docs: move Broker docstrings into Sphinx. 7 years ago
David Wilson ac7cada323 docs: more getting started guide 7 years ago
David Wilson ffa063cc01 docs: annother barriage of cross-reference fixes. 7 years ago
David Wilson b3bd075d37 docs: getting started 7 years ago
David Wilson 792e789908 More. 7 years ago
David Wilson c15d227da4 docs: way more appropriate image 7 years ago
David Wilson b94e7b3678 docs: more getting started 7 years ago
David Wilson 709b38c36e docs: Getting started tidyups 7 years ago
David Wilson dcc45bc7de docs: Get started on Getting Started 7 years ago
David Wilson f1d82c7284 More API documentation. 7 years ago
David Wilson 0565784164 Package rename cleanup. 7 years ago
David Wilson abfa85d7da Remove set from permitted types. 7 years ago
David Wilson 092bbef0b3 Reorder table of contents. 7 years ago
David Wilson caa1fde4fb Add serialization rules section. 7 years ago
David Wilson e7ff6259a3 Initial commit. 7 years ago