Skip to content

Instantly share code, notes, and snippets.

@an01f01
Last active October 1, 2021 16:04
Show Gist options
  • Save an01f01/3b99d851b22717a8c6f8927be160052b to your computer and use it in GitHub Desktop.
Save an01f01/3b99d851b22717a8c6f8927be160052b to your computer and use it in GitHub Desktop.
tornado/platform/asyncio.py
import concurrent.futures
import functools
from threading import get_ident
from tornado.gen import convert_yielded
from tornado.ioloop import IOLoop, _Selectable
import asyncio
# Start of fix for Windows
import sys
if sys.platform == 'win32':
asyncio.set_event_loop_policy(asyncio.WindowsSelectorEventLoopPolicy())
# End of fix
import typing
from typing import Any, TypeVar, Awaitable, Callable, Union, Optional
if typing.TYPE_CHECKING:
from typing import Set, Dict, Tuple # noqa: F401
_T = TypeVar("_T")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment