_overlapped.ConnectPipe(): release the GIL

This commit is contained in:
Victor Stinner 2015-01-26 22:42:10 +01:00
parent 29487bbe12
commit 54faf33fc4
1 changed files with 3 additions and 0 deletions

View 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);