37#include "blocxx/BLOCXX_config.h"
48#ifdef BLOCXX_HAVE_SYS_TIME_H
57#if defined(BLOCXX_USE_PTHREAD)
109 return x.tv_sec <
y.tv_sec ||
110 x.tv_sec ==
y.tv_sec &&
x.tv_nsec <
y.tv_nsec;
172#elif defined (BLOCXX_WIN32)
177 m_condition->waitersCount = 0;
178 m_condition->wasBroadcast =
false;
#define BLOCXX_DEFINE_EXCEPTION_WITH_ID(NAME)
Define a new exception class named <NAME>Exception that derives from Exception.
#define BLOCXX_THROW(exType, msg)
Throw an exception using FILE and LINE.
~Condition()
Destroy this Condition object.
void wait(NonRecursiveMutexLock &lock)
Atomically unlock a given mutex and wait for the this Condition object to get signalled.
void notifyAll()
Signal all threads that are currently waiting on the Condition object.
bool timedWait(NonRecursiveMutexLock &lock, const Timeout &timeout)
Atomically unlock a given mutex and wait for a given amount of time for this Condition object to get ...
Condition()
Construct a new Condition object.
bool doTimedWait(NonRecursiveMutex &mutex, const Timeout &timeout)
ConditionVar_t m_condition
void notifyOne()
Signal one thread that is currently waiting on the Condition object through the wait or timedWait met...
void doWait(NonRecursiveMutex &mutex)
static DateTime getCurrent()
Gets a DateTime instance set to the current system time.
Note that descriptions of what exceptions may be thrown assumes that object is used correctly,...
NonRecursiveMutex * m_mutex
A timeout can be absolute, which means that it will happen at the specified DateTime.
static Timeout relative(float seconds)
BLOCXX_COMMON_API void testCancel()
Test if this thread has been cancelled.
bool operator==(const Array< T > &x, const Array< T > &y)