Flip `infected_asyncio` status msg to `.runtime()`
parent
9292d73b40
commit
3d12a7e005
|
@ -577,14 +577,18 @@ def run_as_asyncio_guest(
|
||||||
log.runtime(f"trio_main finished: {main_outcome!r}")
|
log.runtime(f"trio_main finished: {main_outcome!r}")
|
||||||
|
|
||||||
# start the infection: run trio on the asyncio loop in "guest mode"
|
# start the infection: run trio on the asyncio loop in "guest mode"
|
||||||
log.info(f"Infecting asyncio process with {trio_main}")
|
log.runtime(
|
||||||
|
'Infecting `asyncio`-process with a `trio` guest-run of\n\n'
|
||||||
|
f'{trio_main!r}\n\n'
|
||||||
|
|
||||||
|
f'{trio_done_callback}\n'
|
||||||
|
)
|
||||||
trio.lowlevel.start_guest_run(
|
trio.lowlevel.start_guest_run(
|
||||||
trio_main,
|
trio_main,
|
||||||
run_sync_soon_threadsafe=loop.call_soon_threadsafe,
|
run_sync_soon_threadsafe=loop.call_soon_threadsafe,
|
||||||
done_callback=trio_done_callback,
|
done_callback=trio_done_callback,
|
||||||
)
|
)
|
||||||
# ``.unwrap()`` will raise here on error
|
# NOTE `.unwrap()` will raise on error
|
||||||
return (await trio_done_fut).unwrap()
|
return (await trio_done_fut).unwrap()
|
||||||
|
|
||||||
# might as well if it's installed.
|
# might as well if it's installed.
|
||||||
|
|
Loading…
Reference in New Issue