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.stin...@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@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) _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com