7 #ifndef KEA_THREAD_SYNC_H 8 #define KEA_THREAD_SYNC_H 12 #include <boost/noncopyable.hpp> 39 class Mutex : boost::noncopyable {
98 if (!mutex.tryLock()) {
147 void postLockAction();
159 void preUnlockAction(
bool throw_ok);
void wait(Mutex &mutex)
Wait on the condition variable.
A generic exception that is thrown if a parameter given to a method or function is considered invalid...
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
This holds a lock on a Mutex.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
AlreadyLocked(const char *file, size_t line, const char *what)
Locker(Mutex &mutex, bool block=true)
Constructor.
Encapsulation for a condition variable.
bool locked() const
If the mutex is currently locked.
Exception thrown when the mutex is already locked and a non-blocking locker is attempted around it.
Defines the logger used by the top-level component of kea-dhcp-ddns.
Mutex with very simple interface.
void signal()
Unblock a thread waiting for the condition variable.