forked from goodboy/tractor
Instead of tracking feeder mem chans per RPC dialog, store `Context` instances which (now) hold refs to the underlying RPC-task feeder chans and track them inside a `Actor._contexts` map. This begins a transition to making the "context" idea the primitive abstraction for representing messaging dialogs between tasks in different memory domains (i.e. usually separate processes). A slew of changes made this possible: - change `Actor.get_memchans()` -> `.get_context()`. - Add new `Context._send_chan` and `._recv_chan` vars. - implicitly create a new context on every `Actor.send_cmd()` call. - use the context created by `.send_cmd()` in `Portal.open_context()` instead of manually creating one. - call `Actor.get_context()` inside tasks run from `._invoke()` such that feeder chans are implicitly created for callee tasks thus fixing the bug #265. NB: We might change some of the internal semantics to do with *when* the feeder chans are actually created to denote whether or not a far end task is actually *read to receive* messages. For example, in the cases where it **never** will be ready to receive messages (one-way streaming, a context that never opens a stream, etc.) we will likely want some kind of error or at least warning to the caller that messages can't be sent (yet). |
||
|---|---|---|
| .. | ||
| testing | ||
| trionics | ||
| __init__.py | ||
| _actor.py | ||
| _child.py | ||
| _clustering.py | ||
| _debug.py | ||
| _discovery.py | ||
| _entry.py | ||
| _exceptions.py | ||
| _forkserver_override.py | ||
| _ipc.py | ||
| _mp_fixup_main.py | ||
| _portal.py | ||
| _root.py | ||
| _spawn.py | ||
| _state.py | ||
| _streaming.py | ||
| _supervise.py | ||
| log.py | ||
| msg.py | ||