[Python-checkins] cpython (3.4): asyncio, _overlapped.ConnectPipe(): release the GIL

victor.stinner python-checkins at python.org
Mon Jan 26 22:44:11 CET 2015


https://hg.python.org/cpython/rev/0024942193e5
changeset:   94326:0024942193e5
branch:      3.4
parent:      94324:9532923cbf2b
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Mon Jan 26 22:43:39 2015 +0100
summary:
  asyncio, _overlapped.ConnectPipe(): release the GIL

files:
  Modules/overlapped.c |  3 +++
  1 files changed, 3 insertions(+), 0 deletions(-)


diff --git a/Modules/overlapped.c b/Modules/overlapped.c
--- a/Modules/overlapped.c
+++ b/Modules/overlapped.c
@@ -1146,10 +1146,13 @@
     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);

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list