Home
libucxx
libucxx
ucxx
nightly (0.53)
nightly (0.53)
stable (0.52)
legacy (0.51)
Toggle main menu visibility
Loading...
Searching...
No Matches
python
include
ucxx
python
python_future_task_collector.h
1
5
#pragma once
6
7
#include <mutex>
8
#include <vector>
9
10
#include <Python.h>
11
12
namespace
ucxx
{
13
14
namespace
python {
15
26
class
PythonFutureTaskCollector {
27
public
:
28
std::vector<PyObject*>
_toCollect
{};
29
std::mutex
_mutex
{};
30
37
[[nodiscard]]
static
PythonFutureTaskCollector&
get
();
38
44
void
push
(PyObject* handle);
45
56
void
collect
();
57
58
private
:
64
PythonFutureTaskCollector();
65
66
public
:
67
PythonFutureTaskCollector(
const
PythonFutureTaskCollector&) =
delete
;
68
PythonFutureTaskCollector& operator=(PythonFutureTaskCollector
const
&) =
delete
;
69
PythonFutureTaskCollector(PythonFutureTaskCollector&& o) =
delete
;
70
PythonFutureTaskCollector& operator=(PythonFutureTaskCollector&& o) =
delete
;
71
77
~PythonFutureTaskCollector
();
78
};
79
80
}
// namespace python
81
82
}
// namespace ucxx
ucxx::python::PythonFutureTaskCollector::push
void push(PyObject *handle)
ucxx::python::PythonFutureTaskCollector::~PythonFutureTaskCollector
~PythonFutureTaskCollector()
ucxx::python::PythonFutureTaskCollector::_mutex
std::mutex _mutex
Mutex to provide safe access to _toCollect.
Definition
python_future_task_collector.h:29
ucxx::python::PythonFutureTaskCollector::collect
void collect()
ucxx::python::PythonFutureTaskCollector::_toCollect
std::vector< PyObject * > _toCollect
Tasks to be collected.
Definition
python_future_task_collector.h:28
ucxx::python::PythonFutureTaskCollector::get
static PythonFutureTaskCollector & get()
ucxx
Definition
address.h:16
Generated by
1.18.0