1
0
Fork 0
tractor/tractor
Tyler Goodlet dd168184c3 Add a open-ctx-with-self test
Found exactly why trying this won't work when playing around with
opening workspaces in `modden` using a `Portal.open_context()` back to
the 'bigd' root actor: the RPC machinery only registers one entry in
`Actor._contexts` which will get overwritten by each task's side and
then experience race-based IPC msging errors (eg. rxing `{'started': _}`
on the callee side..). Instead make opening a ctx back to the self-actor
a runtime error describing it as an invalid op.

To match:
- add a new test `test_ctx_with_self_actor()` to the context semantics
  suite.
- tried out adding a new `side: str` to the `Actor.get_context()` (and
  callers) but ran into not being able to determine the value from in
  `._push_result()` where it's needed to figure out which side to push
  to.. So, just leaving the commented arg (passing) in the runtime core
  for now in case we can come back to trying to make it work, tho i'm
  thinking it's not the right hack anyway XD
2024-03-11 10:29:42 -04:00
..
devx Woops, fix `_post_mortem()` type sig.. 2024-03-07 21:24:34 -05:00
experimental Move move context code into new `._context` mod 2023-05-15 10:00:45 -04:00
msg Make `NamespacePath` kinda support methods.. 2024-02-29 17:37:02 -05:00
trionics Try allowing multi-pops of `_Cache.locks` for now? 2024-01-23 11:13:07 -05:00
__init__.py Use `import <name> as <name>,` style over `__all__` in pkg mod 2024-01-02 10:25:17 -05: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 Add a open-ctx-with-self test 2024-03-11 10:29:42 -04:00
_discovery.py Add a `._state._runtime_vars['_registry_addrs']` 2024-03-08 15:34:20 -05:00
_entry.py `._entry`: use same msg info in start/terminate log 2024-03-05 12:30:34 -05:00
_exceptions.py Add "fancier" remote-error `.__repr__()`-ing 2024-02-29 18:56:31 -05:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py Fix `Channel.__repr__()` safety, renames to `._transport` 2024-02-29 18:37:04 -05: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 Add a open-ctx-with-self test 2024-03-11 10:29:42 -04:00
_root.py Support a `._state.last_actor()` getter 2024-03-08 14:11:17 -05:00
_runtime.py Add a open-ctx-with-self test 2024-03-11 10:29:42 -04:00
_shm.py Updates from latest `piker.data._sharedmem` changes 2023-06-22 17:16:17 -04:00
_spawn.py Spawn naming and log format tweaks 2024-03-01 11:37:23 -05:00
_state.py Add a `._state._runtime_vars['_registry_addrs']` 2024-03-08 15:34:20 -05:00
_streaming.py Let `MsgStream.receive_nowait()` take in msg key list 2024-03-11 10:20:55 -04:00
_supervise.py Support a `._state.last_actor()` getter 2024-03-08 14:11:17 -05:00
log.py .log: more multi-line styling 2024-02-20 13:22:44 -05:00
to_asyncio.py Unify some log msgs in `.to_asyncio` 2024-03-08 16:07:17 -05:00