asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).

This commit is contained in:
Guido van Rossum 2013-10-30 14:52:03 -07:00
parent 90fb914b4b
commit 5969128a86
7 changed files with 137 additions and 195 deletions

View file

@ -4,10 +4,18 @@ import sys
# The selectors module is in the stdlib in Python 3.4 but not in 3.3.
# Do this first, so the other submodules can use "from . import selectors".
# Prefer asyncio/selectors.py over the stdlib one, as ours may be newer.
try:
import selectors # Will also be exported.
except ImportError:
from . import selectors
except ImportError:
import selectors # Will also be exported.
if sys.platform == 'win32':
# Similar thing for _overlapped.
try:
from . import _overlapped
except ImportError:
import _overlapped # Will also be exported.
# This relies on each of the submodules having an __all__ variable.
from .futures import *