tractor/tractor
Tyler Goodlet 318027ebd1 Raise stream overruns on one side never opened
A context stream overrun should normally never take place since if
a stream is opened (via ``Context.open_stream()``) backpressure is
applied on the message buffer (unless explicitly disabled by the
``backpressure=False`` flag) such that an overrun on the receiving task
should result in blocking the (remote) sender task (eventually depending
on the underlying ``MsgStream`` transport).

Here we add a special error message that reports if one side never
opened a stream and let's the user know in the overrun error message
that they may be trying to push messages to a task that isn't ready to
receive them.

Further fixes / details:
- pop any `Context` at the end of any `_invoke()` task that creates
  one and registers with the runtime.
- ignore but warn about messages received for a context that either
  no longer exists or is unknown (guarding against crashes by malicious
  packets in the latter case)
2021-12-06 11:54:21 -05:00
..
testing Drop trailing comma 2021-07-06 08:23:29 -04:00
trionics Change to `gather_contexts()`, use event for graceful exit 2021-10-24 14:00:01 -04:00
__init__.py Add 'open_actor_cluster' to __all__ 2021-10-23 16:17:29 -04:00
_actor.py Raise stream overruns on one side never opened 2021-12-06 11:54:21 -05:00
_child.py Docstring to the top\!, and redundant spaces goodbye\! 2020-07-29 15:39:38 -03:00
_clustering.py Make auto generated child names <parent_name>.<name> 2021-11-02 15:40:15 -04:00
_debug.py Fix missing yield in lock acquirer 2021-11-07 23:48:05 -05:00
_discovery.py Remove union type for root getter 2021-10-14 13:39:46 -04:00
_entry.py Try not masking SIGINT in child processes 2021-09-02 16:22:59 -04:00
_exceptions.py Add a stream overrun exception 2021-12-05 18:28:02 -05:00
_forkserver_override.py Ignore type checks on stdlib overrides 2021-02-21 14:08:23 -05:00
_ipc.py Appease mypy 2021-12-02 15:29:04 -05:00
_mp_fixup_main.py Fix more stdlib typing issues with latest mypy 2021-02-21 12:48:03 -05:00
_portal.py Pop context on `.open_context()` exit 2021-12-06 11:54:21 -05:00
_root.py De-noise warnings, add a 'cancel' log level 2021-10-06 17:02:13 -04:00
_spawn.py Don't cancel receive streams inside `.cancel_actor()` 2021-12-02 15:29:04 -05:00
_state.py Add a no runtime error 2021-04-28 12:23:08 -04:00
_streaming.py Better idea, enable backpressure on opened streams 2021-12-06 11:54:21 -05:00
_supervise.py Add a nursery "exited" signal 2021-12-02 08:18:04 -05:00
log.py De-noise warnings, add a 'cancel' log level 2021-10-06 17:02:13 -04:00
msg.py Adjustments for non-frozen context dataclass change 2021-07-06 08:23:29 -04:00