diff options
Diffstat (limited to 'libs/pbd/pool.cc')
-rw-r--r-- | libs/pbd/pool.cc | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/libs/pbd/pool.cc b/libs/pbd/pool.cc index 020f296f61..404fab60e3 100644 --- a/libs/pbd/pool.cc +++ b/libs/pbd/pool.cc @@ -175,6 +175,20 @@ PerThreadPool::create_per_thread_pool (string n, unsigned long isize, unsigned l _key.set (new CrossThreadPool (n, isize, nitems, this)); } +/** @return True if CrossThreadPool for the current thread exists, + * False otherwise + */ +bool +PerThreadPool::has_per_thread_pool () +{ + CrossThreadPool* p = _key.get(); + if (p) { + return true; + } + return false; +} + + /** @return CrossThreadPool for the current thread, which must previously have been created by * calling create_per_thread_pool in the current thread. */ |