asyncio.py 301 B

12345678910
  1. import asyncio
  2. import logging
  3. import sys
  4. logger = logging.getLogger("uvicorn.error")
  5. def asyncio_setup(use_subprocess: bool = False) -> None:
  6. if sys.platform == "win32" and use_subprocess:
  7. asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy()) # pragma: full coverage