Inheritance diagram for Lockable:
This class is used as interface for the some synchronization objects. The public interface contains two methods:
It is recommended to use Locker guard class instead direct enter()/leave() method calling.
Lockable | ( | ) | [inline, protected] |
Trivial constructor.
~Lockable | ( | ) | [inline, protected] |
Trivial destructor.
void enter | ( | ) | [pure virtual] |
Lock synchronization object.
If synchronization object is not locked by another thread or process, then it will be locked.
If synchronization object is already locked by another thread or process, then this method waits for this object and lock it.
After synchronization object was locked it should be unlocked by leave() method.
Implemented in CriticalSection.
void leave | ( | ) | [pure virtual] |
Unlock synchronization object.
This method unlocks the synchronization object locked by enter() method.
Implemented in CriticalSection.