summaryrefslogtreecommitdiff
path: root/libs/pbd/pool.cc
diff options
context:
space:
mode:
authorGZharun <grygoriiz@wavesglobal.com>2015-02-24 14:27:36 +0200
committerPaul Davis <paul@linuxaudiosystems.com>2015-06-29 14:16:42 -0400
commitef59fbffa17c6ed08e22d17daaea0d6fa4c4ce18 (patch)
tree08d0852c0795b0d769686a713e006db8dba7f93f /libs/pbd/pool.cc
parent017e580c9f1f03f6dab574406aaad028bebc452a (diff)
[Summary] Added possibility to identify IO thread which does not have required resources initialized during process callback handling
Conflicts: libs/ardour/ardour/audioengine.h libs/backends/wavesaudio/waves_audiobackend.cc libs/pbd/pbd/pool.h
Diffstat (limited to 'libs/pbd/pool.cc')
-rw-r--r--libs/pbd/pool.cc14
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.
*/