- PyGILState_Ensure
PyGILState_STATE PyGILState_Ensure()
Ensure that the current thread is ready to call the Python
C API, regardless of the current state of Python, or of its
thread lock. This may be called as many times as desired
by a thread so long as each call is matched with a call to
PyGILState_Release(). In general, other thread-state APIs may
be used between _Ensure() and _Release() calls, so long as the
thread-state is restored to its previous state before the Release().
For example, normal use of the Py_BEGIN_ALLOW_THREADS/
Py_END_ALLOW_THREADS macros are acceptable.
- PyGILState_GetThisThreadState
PyThreadState* PyGILState_GetThisThreadState()
Helper/diagnostic function - get the current thread state for
this thread. May return NULL if no GILState API has been used
on the current thread. Note that the main thread always has such a
thread-state, even if no auto-thread-state call has been made
on the main thread.
- PyGILState_Release
void PyGILState_Release(PyGILState_STATE)
Release any resources previously acquired. After this call, Python's
state will be the same as it was prior to the corresponding
PyGILState_Ensure() call (but generally this state will be unknown to
the caller, hence the use of the GILState API.)
- PyInterpreterState_Clear
void PyInterpreterState_Clear(PyInterpreterState*)
- PyInterpreterState_Delete
void PyInterpreterState_Delete(PyInterpreterState*)
- PyInterpreterState_Head
PyInterpreterState* PyInterpreterState_Head()
- PyInterpreterState_New
PyInterpreterState* PyInterpreterState_New()
- PyInterpreterState_Next
PyInterpreterState* PyInterpreterState_Next(PyInterpreterState*)
- PyInterpreterState_ThreadHead
PyThreadState* PyInterpreterState_ThreadHead(PyInterpreterState*)
- PyState_FindModule
PyObject* PyState_FindModule(PyModuleDef*)
- PyThreadState_Clear
void PyThreadState_Clear(PyThreadState*)
- PyThreadState_Delete
void PyThreadState_Delete(PyThreadState*)
- PyThreadState_DeleteCurrent
void PyThreadState_DeleteCurrent()
- PyThreadState_GET
auto PyThreadState_GET()
- PyThreadState_GET
auto PyThreadState_GET()
- PyThreadState_Get
PyThreadState* PyThreadState_Get()
- PyThreadState_GetDict
PyObject_BorrowedRef* PyThreadState_GetDict()
- PyThreadState_New
PyThreadState* PyThreadState_New(PyInterpreterState*)
- PyThreadState_Next
PyThreadState* PyThreadState_Next(PyThreadState*)
- PyThreadState_SetAsyncExc
int PyThreadState_SetAsyncExc(C_long, PyObject*)
- PyThreadState_Swap
PyThreadState* PyThreadState_Swap(PyThreadState*)
- _PyGILState_Reinit
void _PyGILState_Reinit()
- _PyState_AddModule
int _PyState_AddModule(PyObject*, PyModuleDef*)
- _PyThreadState_Init
void _PyThreadState_Init(PyThreadState*)
- _PyThreadState_Prealloc
PyThreadState* _PyThreadState_Prealloc(PyInterpreterState*)
Mirror pystate.h
Thread and interpreter state structures and their interfaces