69 template<
typename Pred>
81 template<
typename Pred>
181template<
typename Pred>
188template<
typename Pred>
226 throw valueError(
"Invalid mutex type for condition variable: must be pMutex");
239 throw valueError(
"Invalid mutex type for condition variable: must be pMutex");
246 if (
code == 0)
return true;
268 std::cerr <<
"Warning: Failed to destroy condition variable (pthread_cond_destroy returned "
269 <<
code <<
")" << std::endl;
Abstract base class for condition variable implementations.
Definition condition.h:38
virtual void notifyAll()=0
Notifies all waiting threads.
conditionBase & operator=(const conditionBase &)=delete
Deleted copy assignment operator.
virtual void wait(mutexBase &mutex)=0
Waits for notification while holding the mutex.
conditionBase(const conditionBase &)=delete
Deleted copy constructor.
virtual bool waitFor(mutexBase &mutex, time::duration d)=0
Waits for notification with timeout.
void notifySome(u_integer n)
Notifies a specified number of waiting threads.
Definition condition.h:203
virtual ~conditionBase()=default
Virtual destructor.
conditionBase()=default
Default constructor.
virtual void notify()=0
Notifies one waiting thread.
Abstract base class for mutex implementations.
Definition mutex.h:30
Unique ownership smart pointer with move semantics.
Definition ownerPtr.h:37
POSIX condition variable implementation.
Definition condition.h:129
void wait(mutexBase &mutex) override
Waits for notification while holding the mutex.
Definition condition.h:222
bool waitFor(mutexBase &mutex, time::duration d) override
Waits for notification with timeout.
Definition condition.h:235
void notifyAll() override
Notifies all waiting threads.
Definition condition.h:258
void notify() override
Notifies one waiting thread.
Definition condition.h:251
~pCondition() override
Destroys the condition variable.
Definition condition.h:265
pCondition()
Constructs and initializes the condition variable.
Definition condition.h:214
POSIX thread mutex implementation.
Definition mutex.h:153
static std::string formatString(const TYPE &t)
Universal value-to-string conversion with type-specific formatting.
Definition printable.h:339
Exception for generic system failure.
Definition error.h:413
Represents a time duration with nanosecond precision.
Definition zeit.h:134
Represents a point in time with nanosecond precision.
Definition zeit.h:374
static point now()
Gets current time point.
Definition zeit.h:1352
Exception for invalid parameter values.
Definition error.h:219
std::uint32_t u_integer
32-bit unsigned integer type for sizes and indexes
Definition config.h:263
Cross-platform mutex and lock management utilities.
Main namespace for the project Original.
Definition algorithms.h:21
Time and date handling utilities.