7 #ifndef COMMUNICATIONTHREAD_H 8 #define COMMUNICATIONTHREAD_H 10 #include <condition_variable> 36 lock = std::unique_lock<std::mutex>(
m);
67 std::lock(
m, other.
m);
68 std::lock_guard<std::mutex> self_lock(
m, std::adopt_lock);
69 std::lock_guard<std::mutex> other_lock(other.
m, std::adopt_lock);
72 lock = std::unique_lock<std::mutex>(
m);
109 mutable std::mutex
m;
111 std::unique_lock<std::mutex>
lock;
115 #endif // COMMUNICATIONTHREAD_H virtual void workerFunction()=0
Generic threadded worker function of this object.
CommunicationThread & operator=(const CommunicationThread &other)
CommunicationThread default Copy assignment.
std::unique_lock< std::mutex > lock
void sleep()
Locks the current worker thread until wakeUp() is called.
virtual void stopThread()=0
Stop the threadded workload.
virtual void startThread()=0
Start the threadded workload.
The CommunicationThread class is the abstract base class of all thread objects used in the communicat...
void wakeUp()
Unlocks the current worker thread.
std::condition_variable cond_var
CommunicationThread & operator=(CommunicationThread &&other)=delete
CommunicationThread default Move assignment.
CommunicationThread()
CommunicationThread default constructor.