2e1666d386
Unlike ctypes, Cython by default do not release GIL when calling into C API functions. This causes problems when the function is long running. As the particular calling thread will block other python threads by holding the GIL. This PR explicitly releases GIL when calling into possible long running functions. It fixes the timeout issue in PopenPool which previously relied on another python thread for timeout. Added a regression test-case by changing sleep to sleep in FFI, which previously will indefinitely block the popen tests.