File: uvloop.py

package info (click to toggle)
python-uvicorn 0.38.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,932 kB
  • sloc: python: 9,184; sh: 48; makefile: 15
file content (10 lines) | stat: -rw-r--r-- 236 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
from __future__ import annotations

import asyncio
from collections.abc import Callable

import uvloop


def uvloop_loop_factory(use_subprocess: bool = False) -> Callable[[], asyncio.AbstractEventLoop]:
    return uvloop.new_event_loop