codekingpro/portable-devtools
114k
1from __future__ import annotations2 3import asyncio4import sys5from collections.abc import Callable6 7 8def asyncio_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:9 if sys.platform == "win32" and not use_subprocess:10 return asyncio.ProactorEventLoop11 return asyncio.SelectorEventLoop12 