Add API to query Session event pool size
This commit is contained in:
parent
e81dd6a943
commit
03e0fe0a73
@ -148,6 +148,7 @@ public:
|
||||
static bool has_per_thread_pool ();
|
||||
static void create_per_thread_pool (const std::string& n, uint32_t nitems);
|
||||
static void init_event_pool ();
|
||||
static guint pool_available ();
|
||||
|
||||
CrossThreadPool* event_pool() const { return own_pool; }
|
||||
|
||||
|
@ -43,6 +43,15 @@ SessionEvent::init_event_pool ()
|
||||
pool = new PerThreadPool;
|
||||
}
|
||||
|
||||
guint
|
||||
SessionEvent::pool_available ()
|
||||
{
|
||||
if (!pool || !pool->per_thread_pool (false)) {
|
||||
return 0;
|
||||
}
|
||||
return pool->per_thread_pool()->available ();
|
||||
}
|
||||
|
||||
bool
|
||||
SessionEvent::has_per_thread_pool ()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user