Py.Gilval ensure : unit -> tensure () ensures that the current thread holds the global interpreter lock and hence can call the Python C API in a safe way. Wrapper for PyGILState_Ensure
val release : t -> unitrelease t releases any resource acquired by ensure. Wrapper for PyGILState_Release
check () returns true if the current thread holds the global interpreter lock. Wrapper for PyGILState_Check