Call `actor.cancel(None)` from root to avoid mismatch with (any future) meth sig changes
parent
5ea112699d
commit
930d498841
|
@ -364,7 +364,6 @@ def test_local_task_fanout_from_stream(
|
||||||
'inf_streamer',
|
'inf_streamer',
|
||||||
enable_modules=[__name__],
|
enable_modules=[__name__],
|
||||||
)
|
)
|
||||||
# with trio.fail_after(3):
|
|
||||||
async with (
|
async with (
|
||||||
p.open_context(inf_streamer) as (ctx, _),
|
p.open_context(inf_streamer) as (ctx, _),
|
||||||
ctx.open_stream() as stream,
|
ctx.open_stream() as stream,
|
||||||
|
|
|
@ -343,9 +343,7 @@ async def open_root_actor(
|
||||||
# tempn.start_soon(an.exited.wait)
|
# tempn.start_soon(an.exited.wait)
|
||||||
|
|
||||||
logger.cancel("Shutting down root actor")
|
logger.cancel("Shutting down root actor")
|
||||||
await actor.cancel(
|
await actor.cancel(None) # self cancel
|
||||||
requesting_uid=actor.uid,
|
|
||||||
)
|
|
||||||
finally:
|
finally:
|
||||||
_state._current_actor = None
|
_state._current_actor = None
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue