Avoid inf nursery hang by reversing `async with` ordering

debug_lock_blocking
Tyler Goodlet 2022-10-11 13:48:27 -04:00
parent 3398153c52
commit 30ea7a06b0
1 changed files with 2 additions and 2 deletions

View File

@ -170,11 +170,11 @@ async def trio_ctx(
# message.
with trio.fail_after(2):
async with (
trio.open_nursery() as n,
tractor.to_asyncio.open_channel_from(
sleep_and_err,
) as (first, chan),
trio.open_nursery() as n,
):
assert first == 'start'