1
0
Fork 0
tractor/tractor
Tyler Goodlet aca6503fcd Flatten out RPC loop with `match:`/`case:`
Mainly expanding out the runtime endpoints for cancellation to separate
cases and flattening them with the main RPC-request-invoke block, moving
the non-cancel runtime case (where we call `getattr(actor, funcname)`)
inside the main `Start` case (for now) which branches on `ns=="self"`.

Also, add a new IPC msg `class CancelAck(Return):` which is always
included in the default msg-spec such that runtime cancellation (and
eventually all) endpoints return that msg (instead of a `Return`) and
thus sidestep any currently applied `MsgCodec` such that the results
(`bool`s for most cancel methods) are never violating the current type
limit(s) on `Msg.pld`. To support this expose a new variable
`return_msg: Return|CancelAck` param from
`_invoke()`/`_invoke_non_context)()` and set it to `CancelAck` in the
appropriate endpoint case-blocks of the msg loop.

Clean out all the lingering legacy `chan.send(<dict-msg>)` commented
codez from the invoker funcs, with more cleaning likely to come B)
2024-04-07 10:40:01 -04:00
..
_testing Start a new `._testing.fault_simulation` 2024-04-03 10:19:50 -04:00
devx WIP porting runtime to use `Msg`-spec 2024-04-02 14:05:16 -04:00
experimental Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
msg Flatten out RPC loop with `match:`/`case:` 2024-04-07 10:40:01 -04:00
trionics Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
__init__.py Expose `MsgTypeError` from pkg 2024-04-05 16:32:15 -04:00
_child.py ._child: remove some unused imports.. 2024-01-02 10:24:39 -05:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Make `Context.started()` a type checked IPC send 2024-04-05 16:00:32 -04:00
_discovery.py More spaceless union type annots 2024-03-11 10:33:06 -04:00
_entry.py WIP porting runtime to use `Msg`-spec 2024-04-02 14:05:16 -04:00
_exceptions.py Factor boxed-err formatting into new `pformat_boxed_tb()` helper for use elsewhere 2024-04-05 14:04:32 -04:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Factor `MsgpackTCPStream` msg-type checks 2024-04-05 18:33:46 -04:00
_mp_fixup_main.py Avoid importing mp for as long as possible 2022-02-17 11:55:26 -05:00
_multiaddr.py Fix doc string "its" typo.. 2023-11-06 15:44:21 -05:00
_portal.py Drop `None`-sentinel cancels RPC loop mechanism 2024-04-05 19:07:12 -04:00
_root.py Refine and test `tractor.pause_from_sync()` 2024-03-22 19:58:25 -04:00
_rpc.py Flatten out RPC loop with `match:`/`case:` 2024-04-07 10:40:01 -04:00
_runtime.py Drop `None`-sentinel cancels RPC loop mechanism 2024-04-05 19:07:12 -04:00
_shm.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
_spawn.py WIP porting runtime to use `Msg`-spec 2024-04-02 14:05:16 -04:00
_state.py Add a `._state._runtime_vars['_registry_addrs']` 2024-03-08 15:34:20 -05:00
_streaming.py WIP porting runtime to use `Msg`-spec 2024-04-02 14:05:16 -04:00
_supervise.py Drop extra newline from log msg 2024-03-25 15:03:33 -04:00
log.py .log: more multi-line styling 2024-02-20 13:22:44 -05:00
to_asyncio.py Provision for infected-`asyncio` debug mode support 2024-03-25 16:09:32 -04:00