linuxsampler 2.3.1
LinuxSampler::Sync< T > Class Template Reference

Wraps as a kind of pointer class some data object shared with other threads, to protect / synchronize the shared data against undeterministic concurrent access. More...

#include <SynchronizedConfig.h>

Public Member Functions

 Sync (Synchronizer< T > *syncer)
 
virtual ~Sync ()
 
const Toperator* () const
 
Toperator* ()
 
const Toperator-> () const
 
Toperator-> ()
 

Detailed Description

template<class T>
class LinuxSampler::Sync< T >

Wraps as a kind of pointer class some data object shared with other threads, to protect / synchronize the shared data against undeterministic concurrent access.

It does so by locking the shared data in the Sync constructor and unlocking the shared data in the Sync destructor. Accordingly it can always be considered safe to access the shared data during the whole life time of the Sync object. Due to this design, a Sync object MUST only be accessed and destroyed by exactly one and the same thread which created that same Sync object.

Definition at line 264 of file SynchronizedConfig.h.

Constructor & Destructor Documentation

◆ Sync()

template<class T >
LinuxSampler::Sync< T >::Sync ( Synchronizer< T > *  syncer)
inline

◆ ~Sync()

template<class T >
virtual LinuxSampler::Sync< T >::~Sync ( )
inlinevirtual

Definition at line 271 of file SynchronizedConfig.h.

Member Function Documentation

◆ operator*() [1/2]

template<class T >
T & LinuxSampler::Sync< T >::operator* ( )
inline

Definition at line 286 of file SynchronizedConfig.h.

◆ operator*() [2/2]

template<class T >
const T & LinuxSampler::Sync< T >::operator* ( ) const
inline

Definition at line 285 of file SynchronizedConfig.h.

◆ operator->() [1/2]

template<class T >
T * LinuxSampler::Sync< T >::operator-> ( )
inline

Definition at line 289 of file SynchronizedConfig.h.

◆ operator->() [2/2]

template<class T >
const T * LinuxSampler::Sync< T >::operator-> ( ) const
inline

Definition at line 288 of file SynchronizedConfig.h.


The documentation for this class was generated from the following file: