Library
-------
+- Issue #11382: Trivial system calls, such as dup() or pipe(), needn't
+ release the GIL. Patch by Charles-François Natali.
+
- Issue #11223: Add threading._info() function providing informations about
the thread implementation.
if (!PyArg_ParseTuple(args, "ii", &which, &who))
return NULL;
errno = 0;
- Py_BEGIN_ALLOW_THREADS
retval = getpriority(which, who);
- Py_END_ALLOW_THREADS
if (errno != 0)
return posix_error();
return PyLong_FromLong((long)retval);
if (!PyArg_ParseTuple(args, "iii", &which, &who, &prio))
return NULL;
- Py_BEGIN_ALLOW_THREADS
retval = setpriority(which, who, prio);
- Py_END_ALLOW_THREADS
if (retval == -1)
return posix_error();
Py_RETURN_NONE;
return NULL;
if (!_PyVerify_fd(fd))
return posix_error();
- Py_BEGIN_ALLOW_THREADS
fd = dup(fd);
- Py_END_ALLOW_THREADS
if (fd < 0)
return posix_error();
return PyLong_FromLong((long)fd);
return NULL;
if (!_PyVerify_fd_dup2(fd, fd2))
return posix_error();
- Py_BEGIN_ALLOW_THREADS
res = dup2(fd, fd2);
- Py_END_ALLOW_THREADS
if (res < 0)
return posix_error();
Py_INCREF(Py_None);
HFILE read, write;
APIRET rc;
- Py_BEGIN_ALLOW_THREADS
rc = DosCreatePipe( &read, &write, 4096);
- Py_END_ALLOW_THREADS
if (rc != NO_ERROR)
return os2_error(rc);
#if !defined(MS_WINDOWS)
int fds[2];
int res;
- Py_BEGIN_ALLOW_THREADS
res = pipe(fds);
- Py_END_ALLOW_THREADS
if (res != 0)
return posix_error();
return Py_BuildValue("(ii)", fds[0], fds[1]);
HANDLE read, write;
int read_fd, write_fd;
BOOL ok;
- Py_BEGIN_ALLOW_THREADS
ok = CreatePipe(&read, &write, NULL, 0);
- Py_END_ALLOW_THREADS
if (!ok)
return win32_error("CreatePipe", NULL);
read_fd = _open_osfhandle((Py_intptr_t)read, 0);