Ardour
9.0-pre0-582-g084a23a80d
|
#include <butler.h>
Classes | |
struct | Request |
Public Member Functions | |
Butler (Session &session) | |
~Butler () | |
int | start_thread () |
void | terminate_thread () |
void | schedule_transport_work () |
void | summon () |
void | stop () |
void | wait_until_finished () |
bool | transport_work_requested () const |
void | drop_references () |
void | map_parameters () |
bool | delegate (sigc::slot< void > const &work) |
samplecnt_t | audio_capture_buffer_size () const |
samplecnt_t | audio_playback_buffer_size () const |
uint32_t | midi_buffer_size () const |
Public Member Functions inherited from ARDOUR::SessionHandleRef | |
SessionHandleRef (ARDOUR::Session &s) | |
virtual | ~SessionHandleRef () |
Public Member Functions inherited from PBD::ScopedConnectionList | |
ScopedConnectionList () | |
ScopedConnectionList (const ScopedConnectionList &)=delete | |
ScopedConnectionList & | operator= (const ScopedConnectionList &)=delete |
virtual | ~ScopedConnectionList () |
void | add_connection (const UnscopedConnection &c) |
void | drop_connections () |
Public Attributes | |
std::atomic< int > | should_do_transport_work |
Private Member Functions | |
void * | thread_work () |
void | empty_pool_trash () |
void | process_delegated_work () |
void | config_changed (std::string) |
bool | flush_tracks_to_disk_normal (std::shared_ptr< RouteList const >, uint32_t &errors) |
void | queue_request (Request::Type r) |
Static Private Member Functions | |
static void * | _thread_work (void *arg) |
Private Attributes | |
pthread_t | thread |
bool | have_thread |
Glib::Threads::Mutex | request_lock |
Glib::Threads::Cond | paused |
bool | should_run |
samplecnt_t | _audio_capture_buffer_size |
samplecnt_t | _audio_playback_buffer_size |
uint32_t | _midi_buffer_size |
PBD::RingBuffer< PBD::CrossThreadPool * > | pool_trash |
CrossThreadChannel | _xthread |
PBD::MPMCQueue< sigc::slot< void > > | _delegated_work |
Additional Inherited Members | |
Protected Member Functions inherited from ARDOUR::SessionHandleRef | |
virtual void | session_going_away () |
virtual void | insanity_check () |
Protected Attributes inherited from ARDOUR::SessionHandleRef | |
ARDOUR::Session & | _session |
One of the Butler's functions is to clean up (ie delete) unused CrossThreadPools. When a thread with a CrossThreadPool terminates, its CTP is added to pool_trash. When the Butler thread wakes up, we check this trash buffer for CTPs, and if they are empty they are deleted.
ARDOUR::Butler::Butler | ( | Session & | session | ) |
ARDOUR::Butler::~Butler | ( | ) |
|
staticprivate |
|
inline |
|
inline |
|
private |
|
inline |
void ARDOUR::Butler::drop_references | ( | ) |
|
private |
|
private |
void ARDOUR::Butler::map_parameters | ( | ) |
|
private |
|
private |
void ARDOUR::Butler::schedule_transport_work | ( | ) |
int ARDOUR::Butler::start_thread | ( | ) |
void ARDOUR::Butler::stop | ( | ) |
void ARDOUR::Butler::summon | ( | ) |
void ARDOUR::Butler::terminate_thread | ( | ) |
|
private |
bool ARDOUR::Butler::transport_work_requested | ( | ) | const |
void ARDOUR::Butler::wait_until_finished | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
mutable |