Mirror of mitogen
You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
Go to file
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
.travis issue #148: parent: prevent race in iter_read() 7 years ago
ansible_mitogen ansible: disable script interpreter processing for new-style 7 years ago
docs Move _DEAD into header, autogenerate dead messages 7 years ago
examples issue #164: split "examples" out into regression/integration tests. 7 years ago
mitogen Move _DEAD into header, autogenerate dead messages 7 years ago
tests Move _DEAD into header, autogenerate dead messages 7 years ago
.gitignore docs: fix intensely annoying _prefix, 2 years later. 7 years ago
.lgtm.yml compat: ignore LGTM checks on third party 7 years ago
.travis.yml tests: rename debops mode, add extra centos/version targets 7 years ago
LICENSE Add license text everywhere. 7 years ago
README.md README: move testing bits into tests directory. 7 years ago
dev_requirements.txt tests: Add coverage as a dev requirement 7 years ago
preamble_size.py Merge branch 'master' into eye-of-the-token-its-the-thrill-of-the-light 7 years ago
run_tests issue #164: rename 'test' to 'run_tests' to avoid tab complete conflict 7 years ago
setup.cfg tests: Switch to unit2 test runner, with coverage 7 years ago
setup.py setup: Scan project dir to find packages 7 years ago
tox.ini tests: Switch to unit2 test runner, with coverage 7 years ago

README.md