Base Framework
Protected Member Functions | List of all members
Synchronizeable< LOCK > Class Template Reference

Wrapper for a synchronization object. More...

#include <base/concurrency/Synchronizeable.h>

Inherits Object.

Protected Member Functions

 Synchronizeable ()
 
void exclusiveLock () const
 
void sharedLock () const
 
void releaseLock () const
 

Detailed Description

template<class LOCK = DefaultLock>
class Synchronizeable< LOCK >

Wrapper for a synchronization object.

Wrapper for a synchronization object. Ensures that only one synchronization object is used by a synchronized object. The synchronization object is not considered a part of the state of the synchronized object. Valid synchronization objects are those who implement the Lock interface.

See also
Synchronize Lock ReadWriteLock MutualExclusion Unsafe
Version
1.0

Constructor & Destructor Documentation

◆ Synchronizeable()

template<class LOCK = DefaultLock>
Synchronizeable< LOCK >::Synchronizeable ( )
inlineprotected

Initializes a synchronize able object.

Member Function Documentation

◆ exclusiveLock()

template<class LOCK = DefaultLock>
void Synchronizeable< LOCK >::exclusiveLock ( ) const
inlineprotected

Acquires an exclusive lock on this object.

◆ releaseLock()

template<class LOCK = DefaultLock>
void Synchronizeable< LOCK >::releaseLock ( ) const
inlineprotected

Releases the lock on this object.

◆ sharedLock()

template<class LOCK = DefaultLock>
void Synchronizeable< LOCK >::sharedLock ( ) const
inlineprotected

Acquires a shared lock on this object.