Rename `n: trio.Nursery` -> `tn` (task nursery)
parent
8af9b0201d
commit
cf3e6c1218
|
@ -58,7 +58,7 @@ async def trio_ctx(
|
||||||
raise_after_bp=not bp_before_started,
|
raise_after_bp=not bp_before_started,
|
||||||
) as (first, chan),
|
) as (first, chan),
|
||||||
|
|
||||||
trio.open_nursery() as n,
|
trio.open_nursery() as tn,
|
||||||
):
|
):
|
||||||
assert first == 'start'
|
assert first == 'start'
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ async def trio_ctx(
|
||||||
|
|
||||||
await ctx.started(first)
|
await ctx.started(first)
|
||||||
|
|
||||||
n.start_soon(
|
tn.start_soon(
|
||||||
to_asyncio.run_task,
|
to_asyncio.run_task,
|
||||||
aio_sleep_forever,
|
aio_sleep_forever,
|
||||||
)
|
)
|
||||||
|
@ -83,8 +83,8 @@ async def main(
|
||||||
debug_mode=True,
|
debug_mode=True,
|
||||||
maybe_enable_greenback=True,
|
maybe_enable_greenback=True,
|
||||||
# loglevel='devx',
|
# loglevel='devx',
|
||||||
) as n:
|
) as an:
|
||||||
ptl: Portal = await n.start_actor(
|
ptl: Portal = await an.start_actor(
|
||||||
'aio_daemon',
|
'aio_daemon',
|
||||||
enable_modules=[__name__],
|
enable_modules=[__name__],
|
||||||
infect_asyncio=True,
|
infect_asyncio=True,
|
||||||
|
|
Loading…
Reference in New Issue