From 4c5a60d06a6c93b98cbec4c7672f4bd990ba8a51 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 23 Jan 2020 01:23:26 -0500 Subject: [PATCH] Don't import trip on Windows --- tractor/_spawn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tractor/_spawn.py b/tractor/_spawn.py index 39aa22e..13bcb9a 100644 --- a/tractor/_spawn.py +++ b/tractor/_spawn.py @@ -9,7 +9,6 @@ import platform from typing import Any, List, Dict import trio -import trio_run_in_process from trio_typing import TaskStatus from async_generator import aclosing @@ -41,6 +40,8 @@ if platform.system() == 'Windows': async def proc_waiter(proc: mp.Process) -> None: await trio.hazmat.WaitForSingleObject(proc.sentinel) else: + import trio_run_in_process + async def proc_waiter(proc: mp.Process) -> None: await trio.hazmat.wait_readable(proc.sentinel)