12 #include <ucxx/delayed_submission.h>
50 std::thread _thread{};
51 std::shared_ptr<bool> _stop{std::make_shared<bool>(
false)};
52 bool _pollingMode{
false};
60 std::shared_ptr<DelayedSubmissionCollection> _delayedSubmissionCollection{
84 static void progressUntilSync(
85 std::function<
bool(
void)> progressFunction,
86 std::shared_ptr<bool> stop,
87 std::function<
void(
void)> setThreadId,
90 std::shared_ptr<DelayedSubmissionCollection> delayedSubmissionCollection);
137 std::function<
bool(
void)> progressFunction,
138 std::function<
void(
void)> signalWorkerFunction,
139 std::function<
void(
void)> setThreadId,
142 std::shared_ptr<DelayedSubmissionCollection> delayedSubmissionCollection);
163 [[nodiscard]] std::thread::id
getId()
const;
A thread to progress a ucxx::Worker.
Definition: worker_progress_thread.h:48
WorkerProgressThread(const bool pollingMode, std::function< bool(void)> progressFunction, std::function< void(void)> signalWorkerFunction, std::function< void(void)> setThreadId, ProgressThreadStartCallback startCallback, ProgressThreadStartCallbackArg startCallbackArg, std::shared_ptr< DelayedSubmissionCollection > delayedSubmissionCollection)
Constructor of shared_ptr<ucxx::Worker>.
std::thread::id getId() const
Returns the ID of the progress thread.
~WorkerProgressThread()
ucxx::WorkerProgressThread destructor.
bool isRunning() const
Returns whether the thread is running.
bool pollingMode() const
Returns whether the thread was created for polling progress mode.
std::function< void(void *)> ProgressThreadStartCallback
A user-defined function to execute at the start of the progress thread.
Definition: worker_progress_thread.h:29
void * ProgressThreadStartCallbackArg
Data for the user-defined function provided to progress thread start callback.
Definition: worker_progress_thread.h:37
std::function< void(void)> SignalWorkerFunction
A user-defined function used to wake the worker.
Definition: worker_progress_thread.h:21