tractor/tractor
Tyler Goodlet 38ccbd0a9c Add initial bi-directional streaming
This mostly adds the api described in
https://github.com/goodboy/tractor/issues/53#issuecomment-806258798

The first draft summary:
- formalize bidir steaming using the `trio.Channel` style interface
  which we derive as a `MsgStream` type.
- add `Portal.open_context()` which provides a `trio.Nursery.start()`
  remote task invocation style for setting up and tearing down tasks
  contexts in remote actors.
- add a distinct `'started'` message to the ipc protocol to facilitate
  `Context.start()` with a first return value.
- for our `ReceiveMsgStream` type, don't cancel the remote task in
  `.aclose()`; this is now done explicitly by the surrounding `Context`
   usage: `Context.cancel()`.
- streams in either direction still use a `'yield'` message keeping the
  proto mostly symmetric without having to worry about which side is the
  caller / portal opener.
- subtlety: only allow sending a `'stop'` message during a 2-way
  streaming context from `ReceiveStream.aclose()`, detailed comment
  with explanation is included.

Relates to #53
2021-07-02 11:58:01 -04:00
..
testing Drop tractor.run() from @tractor_test 2021-01-08 20:56:03 -05:00
__init__.py Re-org root actor startup into context manager 2020-12-27 13:29:30 -05:00
_actor.py Add initial bi-directional streaming 2021-07-02 11:58:01 -04:00
_child.py Docstring to the top\!, and redundant spaces goodbye\! 2020-07-29 15:39:38 -03:00
_debug.py Move debugger locking to new stream api 2021-04-28 12:23:08 -04:00
_discovery.py Port inter-process method calls to `Portal.run_from_ns()` 2020-12-22 10:39:47 -05:00
_entry.py Support sync code breakpointing via built-in 2021-02-21 12:36:00 -05:00
_exceptions.py Add our own "transport closed" signal 2021-07-02 11:36:22 -04:00
_forkserver_override.py Ignore type checks on stdlib overrides 2021-02-21 14:08:23 -05:00
_ipc.py Add our own "transport closed" signal 2021-07-02 11:36:22 -04:00
_mp_fixup_main.py Fix more stdlib typing issues with latest mypy 2021-02-21 12:48:03 -05:00
_portal.py Add initial bi-directional streaming 2021-07-02 11:58:01 -04:00
_root.py Shield around root actor cancel 2021-05-06 12:05:17 -04:00
_spawn.py Re-raise any sidestepped `trio.Cancelled` 2021-05-06 12:05:17 -04:00
_state.py Add a no runtime error 2021-04-28 12:23:08 -04:00
_streaming.py Add initial bi-directional streaming 2021-07-02 11:58:01 -04:00
_trionics.py Fix line length 2021-05-07 11:21:40 -04:00
log.py Add a "runtime" log level 2020-12-26 15:45:45 -05:00
msg.py Formatting 2021-04-28 12:23:08 -04:00