Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Page
Library
Module
Module type
Parameter
Class
Class type
Source
Py.Gil
Sourceensure ()
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
release 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
with_lock f
runs f
ensuring that we hold the global interpreter lock to do so. If the lock needs to be acquired it is released once f
completes or if f
raises an exception.