Ardour
9.0-pre0-582-g084a23a80d
|
#include <pool.h>
Public Member Functions | |
PerThreadPool () | |
const Glib::Threads::Private< CrossThreadPool > & | key () const |
void | create_per_thread_pool (std::string name, unsigned long item_size, unsigned long nitems, PoolDumpCallback cb=NULL) |
CrossThreadPool * | per_thread_pool (bool must_exist=true) |
bool | has_per_thread_pool () |
void | set_trash (PBD::RingBuffer< CrossThreadPool * > *t) |
void | add_to_trash (CrossThreadPool *) |
Private Attributes | |
Glib::Threads::Private< CrossThreadPool > | _key |
std::string | _name |
Glib::Threads::Mutex | _trash_mutex |
PBD::RingBuffer< CrossThreadPool * > * | _trash |
A class to manage per-thread pools of memory. One object of this class is instantiated, and then it is used to create per-thread pools for 1 or more threads as required.
PBD::PerThreadPool::PerThreadPool | ( | ) |
void PBD::PerThreadPool::add_to_trash | ( | CrossThreadPool * | ) |
void PBD::PerThreadPool::create_per_thread_pool | ( | std::string | name, |
unsigned long | item_size, | ||
unsigned long | nitems, | ||
PoolDumpCallback | cb = NULL |
||
) |
bool PBD::PerThreadPool::has_per_thread_pool | ( | ) |
|
inline |
CrossThreadPool* PBD::PerThreadPool::per_thread_pool | ( | bool | must_exist = true | ) |
void PBD::PerThreadPool::set_trash | ( | PBD::RingBuffer< CrossThreadPool * > * | t | ) |
|
private |
|
private |
|
private |
mutex to protect either changes to the _trash variable, or writes to the RingBuffer