[Python-Dev] Release or not release the GIL

Guido van Rossum guido at python.org
Fri Feb 1 02:44:35 CET 2013

I'm guessing those system calls are just implemented by the kernel and
cannot block for I/O, so it was deemed unnecessary to release the GIL
around them. I don't mind changing that though, you can never know
what happens when you make a system call.

On Thu, Jan 31, 2013 at 4:07 PM, Victor Stinner
<victor.stinner at gmail.com> wrote:
> Hi,
> While working on the implementation of the PEP 433, I saw different
> places where Python asks for operating resources without releasing the
> GIL.
> In my implementation, I released the GIL in the following places. Is it correct?
> - os.dup()
> - os.dup2()
> - os.pipe()
> - socket.socketpair()
> os.listdir() releases the GIL to call dup(), whereas os.dup() doesn't.
> Victor
> _______________________________________________
> Python-Dev mailing list
> Python-Dev at python.org
> http://mail.python.org/mailman/listinfo/python-dev
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/guido%40python.org

--Guido van Rossum (python.org/~guido)

More information about the Python-Dev mailing list