 |
Kea
1.5.0
|
Go to the documentation of this file.
7 #ifndef INTERPROCESS_SYNC_H
8 #define INTERPROCESS_SYNC_H
14 namespace interprocess {
16 class InterprocessSyncLocker;
143 #endif // INTERPROCESS_SYNC_H
virtual bool tryLock()=0
Try to acquire a lock (doesn't block)
bool tryLock()
Try to acquire a lock (doesn't block)
virtual bool unlock()=0
Release the lock.
InterprocessSync(const std::string &task_name)
Constructor.
bool is_locked_
Is the lock taken?
~InterprocessSyncLocker()
Destructor.
virtual bool lock()=0
Acquire the lock (blocks if something else has acquired a lock on the same task name)
Defines the logger used by the top-level component of kea-dhcp-ddns.
const std::string task_name_
The task name.
Interprocess Sync Locker Class.
bool lock()
Acquire the lock (blocks if something else has acquired a lock on the same task name)
bool isLocked() const
Check if the lock is taken.
InterprocessSync & sync_
Ref to underlying sync object.
InterprocessSyncLocker(InterprocessSync &sync)
Constructor.
virtual ~InterprocessSync()
Destructor.
bool unlock()
Release the lock.