mirror of
https://github.com/python/cpython.git
synced 2025-11-27 13:45:25 +00:00
bpo-46238: reuse _winapi constants in asyncio.windows_events (GH-30352)
This commit is contained in:
parent
3aa5242b54
commit
1b111338cf
2 changed files with 4 additions and 3 deletions
|
|
@ -28,8 +28,8 @@ __all__ = (
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
NULL = 0
|
NULL = _winapi.NULL
|
||||||
INFINITE = 0xffffffff
|
INFINITE = _winapi.INFINITE
|
||||||
ERROR_CONNECTION_REFUSED = 1225
|
ERROR_CONNECTION_REFUSED = 1225
|
||||||
ERROR_CONNECTION_ABORTED = 1236
|
ERROR_CONNECTION_ABORTED = 1236
|
||||||
|
|
||||||
|
|
@ -405,7 +405,7 @@ class ProactorEventLoop(proactor_events.BaseProactorEventLoop):
|
||||||
class IocpProactor:
|
class IocpProactor:
|
||||||
"""Proactor implementation using IOCP."""
|
"""Proactor implementation using IOCP."""
|
||||||
|
|
||||||
def __init__(self, concurrency=0xffffffff):
|
def __init__(self, concurrency=INFINITE):
|
||||||
self._loop = None
|
self._loop = None
|
||||||
self._results = []
|
self._results = []
|
||||||
self._iocp = _overlapped.CreateIoCompletionPort(
|
self._iocp = _overlapped.CreateIoCompletionPort(
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1 @@
|
||||||
|
Reuse ``_winapi`` constants in ``asyncio.windows_events``.
|
||||||
Loading…
Add table
Add a link
Reference in a new issue