[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
This commit is contained in:
GZharun
2015-02-24 14:27:36 +02:00
committed by Paul Davis
parent 017e580c9f
commit ef59fbffa1
7 changed files with 42 additions and 1 deletions

View File

@@ -129,7 +129,7 @@ class LIBPBD_API PerThreadPool
void create_per_thread_pool (std::string name, unsigned long item_size, unsigned long nitems);
CrossThreadPool* per_thread_pool (bool must_exist = true);
bool has_per_thread_pool ();
void set_trash (RingBuffer<CrossThreadPool*>* t);
void add_to_trash (CrossThreadPool *);

View File

@@ -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.
*/