summaryrefslogtreecommitdiff
path: root/libs/ardour/graph.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-04-27 16:43:12 +0000
committerCarl Hetherington <carl@carlh.net>2012-04-27 16:43:12 +0000
commit66255a13c1cc8d819ed7c2ff0d9e72e85e89217c (patch)
tree1238297b1cd9cf197c5e1088e3f893d01eb43c6c /libs/ardour/graph.cc
parente455805d2b97dfff89ff4c9cf0b22d282b7b8366 (diff)
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
Diffstat (limited to 'libs/ardour/graph.cc')
-rw-r--r--libs/ardour/graph.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/libs/ardour/graph.cc b/libs/ardour/graph.cc
index 556748e2de..300271c21a 100644
--- a/libs/ardour/graph.cc
+++ b/libs/ardour/graph.cc
@@ -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);
}
}