#include <gil.h>
Public Member Functions | |
PYBIND11_NOINLINE void | dec_ref () |
PYBIND11_NOINLINE void | disarm () |
PYBIND11_NOINLINE | gil_scoped_acquire () |
gil_scoped_acquire (const gil_scoped_acquire &)=delete | |
void | inc_ref () |
gil_scoped_acquire & | operator= (const gil_scoped_acquire &)=delete |
PYBIND11_NOINLINE | ~gil_scoped_acquire () |
Private Attributes | |
bool | active = true |
bool | release = true |
PyThreadState * | tstate = nullptr |
|
inline |
|
delete |
|
inline |
|
inline |
|
inline |
This method will disable the PyThreadState_DeleteCurrent call and the GIL won't be acquired. This method should be used if the interpreter could be shutting down when this is called, as thread deletion is not allowed during shutdown. Check _Py_IsFinalizing() on Python 3.7+, and protect subsequent code.
|
delete |