mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-07 07:14:56 +01:00
Add API to query Session event pool size
This commit is contained in:
parent
e81dd6a943
commit
03e0fe0a73
2 changed files with 10 additions and 0 deletions
|
|
@ -148,6 +148,7 @@ public:
|
||||||
static bool has_per_thread_pool ();
|
static bool has_per_thread_pool ();
|
||||||
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
|
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
|
||||||
static void init_event_pool ();
|
static void init_event_pool ();
|
||||||
|
static guint pool_available ();
|
||||||
|
|
||||||
CrossThreadPool* event_pool() const { return own_pool; }
|
CrossThreadPool* event_pool() const { return own_pool; }
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,15 @@ SessionEvent::init_event_pool ()
|
||||||
pool = new PerThreadPool;
|
pool = new PerThreadPool;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
guint
|
||||||
|
SessionEvent::pool_available ()
|
||||||
|
{
|
||||||
|
if (!pool || !pool->per_thread_pool (false)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
return pool->per_thread_pool()->available ();
|
||||||
|
}
|
||||||
|
|
||||||
bool
|
bool
|
||||||
SessionEvent::has_per_thread_pool ()
|
SessionEvent::has_per_thread_pool ()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue