19#include <QWaitCondition>
21#include "kanoopcommon.h"
42 _wakeAllWaiters(wakeAllWaiters) {}
80 QVariant
data()
const {
return _data; }
86 void setData(
const QVariant& value) { _data = value; }
98 QWaitCondition _condition;
103 bool _wakeAllWaiters;
void setDebug()
Enable verbose debug output for this event.
MutexEvent(bool wakeAllWaiters=false)
Construct a MutexEvent.
bool wait(int msecs=0)
Block the calling thread until the event is set or the timeout elapses.
void setData(const QVariant &value)
Attach arbitrary data to this event for use by the woken thread.
void clear()
Reset the event to the unsignalled state.
void set()
Signal the event, waking one (or all) waiting thread(s).
QVariant data() const
Return the arbitrary data payload attached to this event.
bool wait(const TimeSpan &timeout)
Block the calling thread until the event is set or the timeout elapses.
bool isWaiting() const
Test whether a thread is currently blocked in wait().
virtual ~MutexEvent()
Virtual destructor.
void setWakeAllWaiters(bool value)
Control whether set() wakes all waiting threads or just one.
double totalMilliseconds() const
totalMilliseconds