 |
Kea
1.5.0
|
Go to the documentation of this file.
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.
This holds a lock on a Mutex.
Mutex with very simple interface.
Locker(Mutex &mutex, bool block=true)
Constructor.
Defines the logger used by the top-level component of kea-dhcp-ddns.
virtual const char * what() const
Returns a C-style character string of the cause of the exception.
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
A generic exception that is thrown if a parameter given to a method or function is considered invalid...
bool locked() const
If the mutex is currently locked.
AlreadyLocked(const char *file, size_t line, const char *what)
Encapsulation for a condition variable.
Exception thrown when the mutex is already locked and a non-blocking locker is attempted around it.
void signal()
Unblock a thread waiting for the condition variable.