]> granicus.if.org Git - python/commitdiff
asyncio, _overlapped.ConnectPipe(): release the GIL
authorVictor Stinner <victor.stinner@gmail.com>
Mon, 26 Jan 2015 21:43:39 +0000 (22:43 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 26 Jan 2015 21:43:39 +0000 (22:43 +0100)
Modules/overlapped.c

index 1a081ecb7704bdd4ef4322faab17eb7aa9099947..ef77c8875aa39ec69fbfa47eb05259ae53e8f7dd 100644 (file)
@@ -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);