Ardour
9.0-pre0-582-g084a23a80d
|
#include <rcu.h>
Public Member Functions | |
RCUManager (T *object_to_be_managed) | |
virtual | ~RCUManager () |
std::shared_ptr< T const > | reader () const |
virtual std::shared_ptr< T > | write_copy ()=0 |
virtual bool | update (std::shared_ptr< T > new_value)=0 |
Protected Types | |
typedef std::shared_ptr< T > * | PtrToSharedPtr |
Protected Member Functions | |
bool | active_read () const |
Protected Attributes | |
std::atomic< PtrToSharedPtr > | managed_object |
Private Attributes | |
std::atomic< int > | _active_reads |
An RCUManager is an object which takes over management of a pointer to another object.
It provides three key methods:
Any existing users of the value returned by reader() can continue to use their copy even as a write_copy()/update() takes place. The RCU manager will manage the various instances of "the managed object" in a way that is transparent to users of the manager and managed object.
|
protected |
|
inline |
|
inlinevirtual |
|
inlineprotected |
|
inline |
|
pure virtual |
Implemented in SerializedRCUManager< T >.
|
pure virtual |
Implemented in SerializedRCUManager< T >, SerializedRCUManager< MIDIInputPorts >, SerializedRCUManager< PortRegistry >, SerializedRCUManager< ActivationMap >, SerializedRCUManager< ARDOUR::PortSet >, SerializedRCUManager< RefCntMap >, SerializedRCUManager< Temporal::TempoMap >, SerializedRCUManager< Ports >, SerializedRCUManager< AutomationControlList >, SerializedRCUManager< AudioInputPorts >, SerializedRCUManager< Values >, SerializedRCUManager< IOPlugList >, SerializedRCUManager< ChannelList >, SerializedRCUManager< BundleList >, SerializedRCUManager< RouteList >, SerializedRCUManager< PortMap >, SerializedRCUManager< PortIndex >, SerializedRCUManager< MonitorPorts >, and SerializedRCUManager< JackPorts >.
|
mutableprivate |
|
protected |