2020-10-04 13:54:36 +00:00
|
|
|
import trio
|
|
|
|
|
import tractor
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
async def breakpoint_forever():
|
2024-04-14 22:53:42 +00:00
|
|
|
'''
|
|
|
|
|
Indefinitely re-enter debugger in child actor.
|
|
|
|
|
|
|
|
|
|
'''
|
2020-10-04 13:54:36 +00:00
|
|
|
while True:
|
|
|
|
|
await trio.sleep(0.1)
|
2024-04-14 22:53:42 +00:00
|
|
|
await tractor.pause()
|
2020-10-04 13:54:36 +00:00
|
|
|
|
|
|
|
|
|
2026-07-02 16:32:49 +00:00
|
|
|
async def main() -> None:
|
2020-10-04 13:54:36 +00:00
|
|
|
|
2021-02-24 18:39:14 +00:00
|
|
|
async with tractor.open_nursery(
|
|
|
|
|
debug_mode=True,
|
2024-04-14 22:53:42 +00:00
|
|
|
loglevel='cancel',
|
2021-02-24 18:39:14 +00:00
|
|
|
) as n:
|
2020-10-04 13:54:36 +00:00
|
|
|
|
|
|
|
|
portal = await n.run_in_actor(
|
|
|
|
|
breakpoint_forever,
|
|
|
|
|
)
|
Fix review nits from PR #460 self-review
Address the actionable findings from the `/code-review` pass
(#1-6); the d2-ext + docstring nits (#7-10) are left for a
follow-up.
Deats,
- `uds_transport_actor_tree.py`: `portal.chan.raddr.sockpath` is
the *shared listener* socket (named for the root registrar), NOT
the child's path — relabel it + lead with the per-child peer pid,
and stop claiming it's the child addr in the docstring,
- `docs.yml`: scope the `pages` `concurrency` group to the `deploy`
job w/ `cancel-in-progress: false` so a PR build can't cancel an
in-flight production deploy,
- `architecture.rst`: `'subint'` is not a selectable `start_method`
on this branch (`SpawnMethodKey` lacks it) — reframe as
in-development/roadmap,
- `context.rst`: `StreamOverrun` isn't re-exported from `tractor`;
point at `tractor._exceptions`,
- `debugging/`: sweep the 3 literalinclude'd examples off the
deprecated `.result()` -> `.wait_for_result()`,
- `quickstart.rst`: proc-title is `name@pid` (per `Aid.reprol`),
not `@uuid`.
NOTE, the `debugging/` examples are pexpect-tested; re-run
`tests/devx/test_debugger.py` for them.
(this patch was generated in some part by [`claude-code`][claude-code-gh])
[claude-code-gh]: https://github.com/anthropics/claude-code
2026-06-25 21:07:44 +00:00
|
|
|
await portal.wait_for_result()
|
2020-10-04 13:54:36 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
2021-02-24 18:39:14 +00:00
|
|
|
trio.run(main)
|