itom
Loading...
Searching...
No Matches
ito::PythonSharedPointerGuard Class Reference

Guard for a shared pointer of a PyObject. More...

#include <pythonSharedPointerGuard.h>

Static Public Member Functions

template<typename _Tp >
static QSharedPointer< _Tp > createPythonSharedPointer (_Tp *sharedPointerData, PyObject *pyObjOwner)
 < main method to get the guarded shared pointer
 

Static Private Member Functions

static void safeDecrefPyObject2Async (PyObject *obj)
 user-defined deleter for the QSharedPointer, released by createPythonSharedPointer
 
template<typename _Tp >
static void deleter (_Tp *sharedPointerData)
 

Static Private Attributes

static QHash< void *, PyObject * > m_hashTable = QHash<void*, PyObject*>()
 

Detailed Description

Guard for a shared pointer of a PyObject.

Member Function Documentation

◆ safeDecrefPyObject2Async()

void ito::PythonSharedPointerGuard::safeDecrefPyObject2Async ( PyObject * obj)
staticprivate

user-defined deleter for the QSharedPointer, released by createPythonSharedPointer

< if the caller of the deleter currently does not own the Python GIL, this method is called to safely decrement the refcount of the owner PyObject. This is done by a worker thread, that tries to acquire the GIL, decrease the refcount and release the GIL.


The documentation for this class was generated from the following files: