Skip to content

Commit

Permalink
Fix problems for unix operating systems
Browse files Browse the repository at this point in the history
  • Loading branch information
Vizonex authored Jan 8, 2025
1 parent b88b44a commit 2acc0d2
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions uvicorn/loops/winloop.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import asyncio
import sys

import winloop
if sys.platform in ("win32", "cygwin"):
import winloop

def winloop_setup(use_subprocess: bool = False) -> None:
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())
def winloop_setup(use_subprocess: bool = False) -> None:
asyncio.set_event_loop_policy(winloop.EventLoopPolicy())

0 comments on commit 2acc0d2

Please sign in to comment.