13
0

Raise an exception if we fail to create our graph

threads.


git-svn-id: svn://localhost/ardour2/branches/3.0@12111 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Carl Hetherington 2012-04-27 16:43:12 +00:00
parent e455805d2b
commit 66255a13c1

View File

@ -108,14 +108,18 @@ Graph::reset_thread_list ()
drop_threads ();
}
if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::main_thread, this), &a_thread, 100000) == 0) {
_thread_list.push_back (a_thread);
if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::main_thread, this), &a_thread, 100000) != 0) {
throw failed_constructor ();
}
_thread_list.push_back (a_thread);
for (uint32_t i = 1; i < num_threads; ++i) {
if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::helper_thread, this), &a_thread, 100000) == 0) {
_thread_list.push_back (a_thread);
if (AudioEngine::instance()->create_process_thread (boost::bind (&Graph::helper_thread, this), &a_thread, 100000) != 0) {
throw failed_constructor ();
}
_thread_list.push_back (a_thread);
}
}