Avoid inf nursery hang by reversing `async with` ordering
parent
3398153c52
commit
30ea7a06b0
|
@ -170,11 +170,11 @@ async def trio_ctx(
|
||||||
# message.
|
# message.
|
||||||
with trio.fail_after(2):
|
with trio.fail_after(2):
|
||||||
async with (
|
async with (
|
||||||
|
trio.open_nursery() as n,
|
||||||
|
|
||||||
tractor.to_asyncio.open_channel_from(
|
tractor.to_asyncio.open_channel_from(
|
||||||
sleep_and_err,
|
sleep_and_err,
|
||||||
) as (first, chan),
|
) as (first, chan),
|
||||||
|
|
||||||
trio.open_nursery() as n,
|
|
||||||
):
|
):
|
||||||
|
|
||||||
assert first == 'start'
|
assert first == 'start'
|
||||||
|
|
Loading…
Reference in New Issue