Port `test_runtime` off `run_in_actor`
Sole call-site: an inlined `run_in_actor(...).result()` -> blocking `tractor.to_actor.run(fn, an=an, ...)` (#477 removal). Behaviour identical — the one-shot's result/error is awaited in the caller's task rather than reaped at nursery teardown; the enclosing `move_on_after` still cancels the sub in the `error_in_child=False` case. (this patch was generated in some part by [`claude-code`][claude-code-gh]) [claude-code-gh]: https://github.com/anthropics/claude-codedrop_ria_nursery
parent
b9d981b063
commit
1f1dcbe1c1
|
|
@ -78,13 +78,12 @@ async def test_lifetime_stack_wipes_tmpfile(
|
||||||
async with tractor.open_nursery(
|
async with tractor.open_nursery(
|
||||||
loglevel=loglevel,
|
loglevel=loglevel,
|
||||||
) as an:
|
) as an:
|
||||||
await ( # inlined `tractor.Portal`
|
await tractor.to_actor.run(
|
||||||
await an.run_in_actor(
|
crash_and_clean_tmpdir,
|
||||||
crash_and_clean_tmpdir,
|
an=an,
|
||||||
tmp_file_path=path,
|
tmp_file_path=path,
|
||||||
error=error_in_child,
|
error=error_in_child,
|
||||||
)
|
)
|
||||||
).result()
|
|
||||||
except (
|
except (
|
||||||
tractor.RemoteActorError,
|
tractor.RemoteActorError,
|
||||||
BaseExceptionGroup,
|
BaseExceptionGroup,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue