Skip to content

Commit

Permalink
bpo-46238: reuse _winapi constants in asyncio.windows_events (GH-…
Browse files Browse the repository at this point in the history
  • Loading branch information
sobolevn committed Jan 4, 2022
1 parent 3aa5242 commit 1b11133
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Lib/asyncio/windows_events.py
Expand Up @@ -28,8 +28,8 @@
)


NULL = 0
INFINITE = 0xffffffff
NULL = _winapi.NULL
INFINITE = _winapi.INFINITE
ERROR_CONNECTION_REFUSED = 1225
ERROR_CONNECTION_ABORTED = 1236

Expand Down Expand Up @@ -405,7 +405,7 @@ async def _make_subprocess_transport(self, protocol, args, shell,
class IocpProactor:
"""Proactor implementation using IOCP."""

def __init__(self, concurrency=0xffffffff):
def __init__(self, concurrency=INFINITE):
self._loop = None
self._results = []
self._iocp = _overlapped.CreateIoCompletionPort(
Expand Down
@@ -0,0 +1 @@
Reuse ``_winapi`` constants in ``asyncio.windows_events``.

0 comments on commit 1b11133

Please sign in to comment.