From 54faf33fc4b9eac9389bf25fc2e9b4adfc3c0838 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Mon, 26 Jan 2015 22:42:10 +0100 Subject: [PATCH] _overlapped.ConnectPipe(): release the GIL --- overlapped.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/overlapped.c b/overlapped.c index 1a081ec..ef77c88 100644 --- a/overlapped.c +++ b/overlapped.c @@ -1146,10 +1146,13 @@ ConnectPipe(OverlappedObject *self, PyObject *args) if (Address == NULL) return NULL; + Py_BEGIN_ALLOW_THREADS PipeHandle = CreateFileW(Address, GENERIC_READ | GENERIC_WRITE, 0, NULL, OPEN_EXISTING, FILE_FLAG_OVERLAPPED, NULL); + Py_END_ALLOW_THREADS + PyMem_Free(Address); if (PipeHandle == INVALID_HANDLE_VALUE) return SetFromWindowsErr(0);