6 #include <knowrob/Logger.h>
7 #include <knowrob/ThreadPool.h>
8 #include <knowrob/integration/python/gil.h>
9 #include <knowrob/integration/python/converter/shared_ptr.h>
11 #define KNOWROB_PY_USE_SHARED_PTR_DELETER_QUEUE
14 void shared_ptr_deleter::operator()(
void const *) {
22 #ifdef KNOWROB_PY_USE_SHARED_PTR_DELETER_QUEUE
25 auto released_ptr = owner.release();
28 auto runner = std::make_shared<knowrob::ThreadPool::LambdaRunner>(
31 handle<> ptr_handle(released_ptr);
34 gil_pool.
pushWork(runner, [](
const std::exception &e) {
35 KB_WARN(
"an exception occurred when deleting ptr: {}.", e.what());
std::function< bool()> StopChecker
void pushWork(const std::shared_ptr< ThreadPool::Runner > &goal, ThreadPool::ExceptionHandler exceptionHandler)
T * get_pointer(std::shared_ptr< T > p)