9#ifndef WORKER_THREADS_HPP
10#define WORKER_THREADS_HPP
13#include <condition_variable>
95 std::vector<CUControllerWorkerThread*> worker_threads;
96 std::latch* all_workers_finished_latch;
98 std::atomic<unsigned long> work_stealing_next_cuID;
99 std::mutex work_stealing_mtx;
144 bool isIdling()
const {
return atomic_flag_idling; }
153 bool use_work_stealing;
154 std::vector<ControlUnit*> connected_units;
155 std::thread current_thread;
157 std::condition_variable cv;
158 std::atomic<bool> atomic_flag_stop;
159 std::atomic<bool> atomic_flag_exec;
160 std::atomic<bool> atomic_flag_running;
161 std::atomic<bool> atomic_flag_idling;
163 std::atomic<bool> error_happened;
165 std::atomic<unsigned long> atomic_param_ts;
Definition worker_threads.hpp:33
ControlUnit * getNextControlUnit()
Definition worker_threads.cpp:112
void executeOneStep(unsigned long ts)
Definition worker_threads.cpp:86
void stopAllWorkerThreads()
Definition worker_threads.cpp:80
bool waitForWorkersToFinish()
Definition worker_threads.cpp:99
void startAllWorkerThreads()
Definition worker_threads.cpp:74
~CUControllerThreadGroupManager()
Definition worker_threads.cpp:65
Definition worker_threads.hpp:108
void executeOneStepForAllConnCUs(unsigned long ts)
Definition worker_threads.cpp:217
bool isIdling() const
Definition worker_threads.hpp:144
void stop()
Stops this working thread.
Definition worker_threads.cpp:207
bool errorHappened() const
Definition worker_threads.hpp:149
void start()
Starts this thread. This method has to be called before the call of executeOneStepForAllConnCUs().
Definition worker_threads.cpp:191
~CUControllerWorkerThread()
Definition worker_threads.cpp:172