summaryrefslogtreecommitdiffstats
path: root/Modules/overlapped.c
diff options
context:
space:
mode:
authorVictor Stinner <victor.stinner@gmail.com>2015-01-26 21:43:39 (GMT)
committerVictor Stinner <victor.stinner@gmail.com>2015-01-26 21:43:39 (GMT)
commit498b1f62dbdf55837d16fcaea9758af0cbebec0d (patch)
tree7b4ba0a36181cc6bb9b3c4c940382230749c3d9a /Modules/overlapped.c
parent41063d2a59a24e257cd9ce62137e36c862e3ab1e (diff)
downloadcpython-498b1f62dbdf55837d16fcaea9758af0cbebec0d.zip
cpython-498b1f62dbdf55837d16fcaea9758af0cbebec0d.tar.gz
cpython-498b1f62dbdf55837d16fcaea9758af0cbebec0d.tar.bz2
asyncio, _overlapped.ConnectPipe(): release the GIL
Diffstat (limited to 'Modules/overlapped.c')
-rw-r--r--Modules/overlapped.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/overlapped.c b/Modules/overlapped.c
index 1a081ec..ef77c88 100644
--- a/Modules/overlapped.c
+++ b/Modules/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);