Files
FastAPI---Microservices/.env/Lib/site-packages/uvicorn/loops/asyncio.py
2026-02-07 02:04:11 -06:00

12 lines
333 B
Python

from __future__ import annotations
import asyncio
import sys
from collections.abc import Callable
def asyncio_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:
if sys.platform == "win32" and not use_subprocess:
return asyncio.ProactorEventLoop
return asyncio.SelectorEventLoop