I want to call some c function from python to be able to improve performance of my code. But I cannot find online whether when I call a C function using the ctypes libraries the GIL is released. As a simple example:
from ctypes import *
fun = cdll.LoadLibrary("libc.so.6")
fun.sleep.argtypes = [c_uint]
fun.sleep(c_uint(5))
Is the GIL released during the call to fun.sleep?