mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
asyncio: Add support for running subprocesses on Windows with the IOCP event loop (Richard Oudkerk).
This commit is contained in:
parent
90fb914b4b
commit
5969128a86
7 changed files with 137 additions and 195 deletions
|
|
@ -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 *
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue