11 #ifdef LIBCARLA_WITH_PYTHON_SUPPORT 12 # if defined(__clang__) 13 # pragma clang diagnostic push 14 # pragma clang diagnostic ignored "-Wdeprecated-register" 16 # include <boost/python.hpp> 17 # if defined(__clang__) 18 # pragma clang diagnostic pop 20 #endif // LIBCARLA_WITH_PYTHON_SUPPORT 28 #ifdef LIBCARLA_WITH_PYTHON_SUPPORT 29 # if PY_MAJOR_VERSION >= 3 30 return PyGILState_Check();
32 PyThreadState *tstate = _PyThreadState_Current;
33 return (tstate !=
nullptr) && (tstate == PyGILState_GetThisThreadState());
37 #endif // LIBCARLA_WITH_PYTHON_SUPPORT 40 #ifdef LIBCARLA_WITH_PYTHON_SUPPORT 50 PyGILState_Release(_state);
55 PyGILState_STATE _state;
66 PyEval_RestoreThread(_state);
71 PyThreadState *_state;
74 #else // LIBCARLA_WITH_PYTHON_SUPPORT 79 #endif // LIBCARLA_WITH_PYTHON_SUPPORT 88 #ifdef LIBCARLA_WITH_PYTHON_SUPPORT 93 #endif // LIBCARLA_WITH_PYTHON_SUPPORT 103 template <
typename T>
105 #ifdef LIBCARLA_WITH_PYTHON_SUPPORT 110 #endif // LIBCARLA_WITH_PYTHON_SUPPORT A deleter that can be passed to a smart pointer to acquire the GIL before destroying the object...
void operator()(T *ptr) const
A deleter that can be passed to a smart pointer to release the GIL before destroying the object...
This file contains definitions of common data structures used in traffic manager. ...
void operator()(T *ptr) const
static bool ThisThreadHasTheGIL()
Inherit (privately) to suppress copy/move construction and assignment.