linuxsampler 2.3.1
|
Base interface class for classes that implement synchronization of data shared between multiple threads. More...
#include <SynchronizedConfig.h>
Public Member Functions | |
virtual void | beginSync ()=0 |
Signal intention to enter a synchronized code block. | |
virtual T & | syncedData ()=0 |
Retrieve reference to critical, shared data. | |
virtual void | endSync ()=0 |
Signal that the synchronized code block has been left. | |
Base interface class for classes that implement synchronization of data shared between multiple threads.
Definition at line 224 of file SynchronizedConfig.h.
Signal intention to enter a synchronized code block.
Depending on the actual implementation, this call may block the calling thread until it is safe to actually use the protected data. After this call returns, it is safe for the calling thread to access and modify the shared data. As soon as the thread is done with accessing the shared data, it MUST call endSync().
Implemented in LinuxSampler::BackBuffer< T >, and LinuxSampler::FrontBuffer< T >.
Referenced by LinuxSampler::Sync< T >::Sync().
Signal that the synchronized code block has been left.
Depending on the actual implementation, this call may block the calling thread for a certain amount of time.
Implemented in LinuxSampler::BackBuffer< T >, and LinuxSampler::FrontBuffer< T >.
Retrieve reference to critical, shared data.
This method shall be called between a beginSync() and endSync() call pair, to be sure that shared data can be accessed safely.
Implemented in LinuxSampler::BackBuffer< T >, and LinuxSampler::FrontBuffer< T >.