Don't import trip on Windows

try_trip^2
Tyler Goodlet 2020-01-23 01:23:26 -05:00
parent 44996fe328
commit 4c5a60d06a
1 changed files with 2 additions and 1 deletions

View File

@ -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)