summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@python.org>2024-02-13 00:28:35 (GMT)
committerGitHub <noreply@github.com>2024-02-13 00:28:35 (GMT)
commitea25f32d5f7d9ae4358338a3fb49bba9b68051a5 (patch)
treecfc1ac858b799465b1354211b7d248277ee85b7b /Objects
parent2f0778675ad0eaf346924ef6a2f60529b92ffcfa (diff)
downloadcpython-ea25f32d5f7d9ae4358338a3fb49bba9b68051a5.zip
cpython-ea25f32d5f7d9ae4358338a3fb49bba9b68051a5.tar.gz
cpython-ea25f32d5f7d9ae4358338a3fb49bba9b68051a5.tar.bz2
gh-89240: Enable multiprocessing on Windows to use large process pools (GH-107873)
We add _winapi.BatchedWaitForMultipleObjects to wait for larger numbers of handles. This is an internal module, hence undocumented, and should be used with caution. Check the docstring for info before using BatchedWaitForMultipleObjects.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/exceptions.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/Objects/exceptions.c b/Objects/exceptions.c
index cff55d0..3df3a9b 100644
--- a/Objects/exceptions.c
+++ b/Objects/exceptions.c
@@ -3539,7 +3539,6 @@ SimpleExtendsException(PyExc_Warning, ResourceWarning,
#undef EOPNOTSUPP
#undef EPROTONOSUPPORT
#undef EPROTOTYPE
-#undef ETIMEDOUT
#undef EWOULDBLOCK
#if defined(WSAEALREADY) && !defined(EALREADY)
@@ -3560,9 +3559,6 @@ SimpleExtendsException(PyExc_Warning, ResourceWarning,
#if defined(WSAESHUTDOWN) && !defined(ESHUTDOWN)
#define ESHUTDOWN WSAESHUTDOWN
#endif
-#if defined(WSAETIMEDOUT) && !defined(ETIMEDOUT)
-#define ETIMEDOUT WSAETIMEDOUT
-#endif
#if defined(WSAEWOULDBLOCK) && !defined(EWOULDBLOCK)
#define EWOULDBLOCK WSAEWOULDBLOCK
#endif
@@ -3747,6 +3743,9 @@ _PyExc_InitState(PyInterpreterState *interp)
#endif
ADD_ERRNO(ProcessLookupError, ESRCH);
ADD_ERRNO(TimeoutError, ETIMEDOUT);
+#ifdef WSAETIMEDOUT
+ ADD_ERRNO(TimeoutError, WSAETIMEDOUT);
+#endif
return _PyStatus_OK();