forked from goodboy/tractor
1
0
Fork 0
tractor/examples/debugging
Tyler Goodlet 72b4dc1461 Provision for infected-`asyncio` debug mode support
It's **almost** there, we're just missing the final translation code to
get from an `asyncio` side task to be able to call
`.devx._debug..wait_for_parent_stdin_hijack()` to do root actor TTY
locking. Then we just need to ensure internals also do the right thing
with `greenback()` for equivalent sync `breakpoint()` style pause
points.

Since i'm deferring this until later, tossing in some xfail tests to
`test_infected_asyncio` with TODOs for the needed implementation as well
as eventual test org.

By "provision" it means we add:
- `greenback` init block to `_run_asyncio_task()` when debug mode is
  enabled (but which will currently rte when `asyncio` is detected)
  using `.bestow_portal()` around the `asyncio.Task`.
- a call to `_debug.maybe_init_greenback()` in the `run_as_asyncio_guest()`
  guest-mode entry point.
- as part of `._debug.Lock.is_main_trio_thread()` whenever the async-lib
  is not 'trio' error lock the backend name (which is obvi `'asyncio'`
  in this use case).
2024-03-25 16:09:32 -04:00
..
asyncio_bp.py Provision for infected-`asyncio` debug mode support 2024-03-25 16:09:32 -04:00
debug_mode_hang.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
fast_error_in_root_after_spawn.py Fix type path to new `_supervise` mod 2021-10-23 15:54:40 -04:00
multi_daemon_subactors.py Adjust all `RemoteActorError.type` using tests 2024-03-19 18:08:54 -04:00
multi_nested_subactors_error_up_through_nurseries.py Expand nested case to include error prop and breakpointing 2022-10-14 19:42:23 -04:00
multi_subactor_root_errors.py Adjust debugger tests to expect depth > 1 crashes 2021-10-14 13:39:46 -04:00
multi_subactors.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
open_ctx_modnofound.py Add basic module-not-found when opening a ctx eg. 2022-08-02 12:17:06 -04:00
per_actor_debug.py Lol. should probably push the example code... 2021-12-10 12:48:05 -05:00
restore_builtin_breakpoint.py Restore `breakpoint()` hook after runtime exits 2023-05-15 00:47:29 -04:00
root_actor_breakpoint.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
root_actor_breakpoint_forever.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
root_actor_error.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
root_cancelled_but_child_is_in_tty_lock.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
root_timeout_while_child_crashed.py Docs and comments tidying 2021-08-01 10:44:13 -04:00
subactor_bp_in_ctx.py Add back in async gen loop 2022-07-27 11:40:02 -04:00
subactor_breakpoint.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
subactor_error.py Drop `tractor.run()` from all examples 2021-05-07 11:21:40 -04:00
sync_bp.py Refine and test `tractor.pause_from_sync()` 2024-03-22 19:58:25 -04:00