summaryrefslogtreecommitdiffstats
path: root/Modules/overlapped.c
diff options
context:
space:
mode:
Diffstat (limited to 'Modules/overlapped.c')
-rw-r--r--Modules/overlapped.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index ef4390b..e5a209b 100644
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -127,8 +127,10 @@ initialize_function_pointers(void)
closesocket(s);
/* On WinXP we will have Py_CancelIoEx == NULL */
+ Py_BEGIN_ALLOW_THREADS
hKernel32 = GetModuleHandle("KERNEL32");
*(FARPROC *)&Py_CancelIoEx = GetProcAddress(hKernel32, "CancelIoEx");
+ Py_END_ALLOW_THREADS
return 0;
}