tractor/tractor
Tyler Goodlet 89fc072ca0 Hm, `asyncio.Task._fut_waiter.set_exception()`?
Since we can't use it to `Task.set_exception()` (since that task method never
seems to work.. XD) and setting the private/internal always seems to do
the desired raising in the task? I realize it's an internal `asyncio`
runtime field but i'd rather take the risk of it breaking then having to
rely on our own equivalent hack..

Also, it seems like the case where the task's associated (and internal)
future-waiter field is null, we won't run into the (same?) prior hanging
issues (maybe since there's nothing for `asyncio` internals to use to
wait XD ??) when `Task.cancel()` is used..??

Main deats,
- add and `Future.set_exception()` a new signal-exception
  `class TrioTaskExited(AsyncioCancelled):` whenever the trio-task exits
  gracefully and the asyncio-side task is still doing blocking work (of
  some sort) which *seem to* be predicated by a check that
  `._fut_waiter is not None`.
- always call `asyncio.Queue.shutdown()` for the same^ as well as
  whenever we decide to call `Task.cancel()`; in that case the shutdown
  relays correctly?

Some further refinements,
- only warn about `Task.cancel()` usage when actually used ;)
- more local scope vars setting in the exit phase of
  `translate_aio_errors()`.
- also in ^ use explicit caught-exc var names for each error-type.
2025-01-02 15:35:36 -05:00
..
_testing Move `mk_cmd()` to `._testing` 2024-07-10 15:40:44 -04:00
devx Drop extra nl from boxed error fmt 2024-12-28 14:34:24 -05:00
experimental Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
hilevel Use shorthand nursery var-names per convention in codebase 2024-12-11 20:26:13 -05:00
msg Draft a (pretty)`Struct.fields_diff()` 2024-12-10 14:12:37 -05:00
trionics Change masked `.pause()` line 2024-12-09 18:04:32 -05:00
__init__.py Finally implement peer-lookup optimization.. 2024-07-04 19:40:11 -04:00
_child.py Hide `._entry`/`._child` frames, tweak some more type annots 2024-04-14 17:49:18 -04:00
_clustering.py Passthrough runtime kwargs from `open_actor_cluster()` 2022-12-11 19:56:08 -05:00
_context.py Support `ctx: UnionType` annots for `@tractor.context` eps 2024-12-11 22:22:26 -05:00
_discovery.py Finally implement peer-lookup optimization.. 2024-07-04 19:40:11 -04:00
_entry.py Pass `infect_asyncio` setting via runtime-vars 2024-07-11 13:22:53 -04:00
_exceptions.py Accept err-type override in `is_multi_cancelled()` 2024-12-27 14:07:50 -05:00
_forkserver_override.py Re-license code base for distribution under AGPL 2021-12-14 23:33:27 -05:00
_ipc.py More formal `TransportClosed` reporting/raising 2024-07-02 12:21:26 -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 More-n-more scops annots in logging 2024-07-04 15:06:15 -04:00
_root.py Expose `debug_filter` from `open_root_actor()` also 2024-12-28 14:35:05 -05:00
_rpc.py More formal `TransportClosed` reporting/raising 2024-07-02 12:21:26 -04:00
_runtime.py Denoise duplicate chan logging for now 2024-12-09 17:36:52 -05:00
_shm.py Drop now-deprecated deps on modern `trio`/Python 2024-03-13 18:41:24 -04:00
_spawn.py Use `._entry` proto-ed "lifetime ops" in logging 2024-07-02 16:31:58 -04:00
_state.py Pass `infect_asyncio` setting via runtime-vars 2024-07-11 13:22:53 -04:00
_streaming.py Reraise RAEs in `MsgStream.receive()`; truncate tbs 2024-07-02 16:31:15 -04:00
_supervise.py Add `tb_hide: bool` ctl flag to `_open_and_supervise_one_cancels_all_nursery()` 2024-08-22 17:22:53 -04:00
log.py Support passing pre-conf-ed `Logger` 2024-12-18 12:30:17 -05:00
to_asyncio.py Hm, `asyncio.Task._fut_waiter.set_exception()`? 2025-01-02 15:35:36 -05:00