127 base_synchronizer &_locker;
auto_synchronizer simplifies concurrent code by automatically unlocking.
~auto_synchronizer()
Releases the lock as this object goes out of scope.
auto_synchronizer(base_synchronizer &locker)
Construction locks the "locker" object for the current program scope.
Interface for a simple form of synchronization.
virtual void establish_lock()=0
virtual void repeal_lock()=0
virtual ~mutex()
Destroys the mutex. It should not be locked upon destruction.
void construct()
Constructor for use with malloc/free instead of new/delete.
void destruct()
Destructor for use with malloc/free instead of new/delete.
void lock()
Clamps down on the mutex, if possible.
virtual void establish_lock()
Satisfies base class requirements for locking.
void unlock()
Gives up the possession of the mutex.
virtual void repeal_lock()
Satisfies base class requirements for unlocking.
mutex()
Constructs a new mutex.
The guards collection helps in testing preconditions and reporting errors.