summaryrefslogtreecommitdiffstats
path: root/src/Thread.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-12-07 05:26:52 +0000
committerDavid Robillard <d@drobilla.net>2007-12-07 05:26:52 +0000
commita702cc5799f9aa5e1902fd24667a31bce8461fd7 (patch)
treedb7f5e48628d5152e12168ead755837bedd441d2 /src/Thread.cpp
parent7cf506c65ca517fc7cd4976f26fc6d5b7b42223c (diff)
downloadraul-a702cc5799f9aa5e1902fd24667a31bce8461fd7.tar.gz
raul-a702cc5799f9aa5e1902fd24667a31bce8461fd7.tar.bz2
raul-a702cc5799f9aa5e1902fd24667a31bce8461fd7.zip
Fix termination of evolution and resumed Jack execution.
git-svn-id: http://svn.drobilla.net/lad/raul@960 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Thread.cpp')
-rw-r--r--src/Thread.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp
index c0b570f..efa4c12 100644
--- a/src/Thread.cpp
+++ b/src/Thread.cpp
@@ -30,6 +30,7 @@ pthread_key_t Thread::_thread_key;
Thread::Thread(const string& name)
: _context(0)
, _name(name)
+ , _exit_flag(false)
, _pthread_exists(false)
{
pthread_once(&_thread_key_once, thread_key_alloc);
@@ -41,6 +42,7 @@ Thread::Thread(const string& name)
Thread::Thread(pthread_t thread, const string& name)
: _context(0)
, _name(name)
+ , _exit_flag(false)
, _pthread_exists(true)
, _pthread(thread)
{
@@ -86,7 +88,8 @@ void
Thread::stop()
{
if (_pthread_exists) {
- pthread_cancel(_pthread);
+ _exit_flag = true;
+ //pthread_cancel(_pthread);
pthread_join(_pthread, NULL);
_pthread_exists = false;
cout << "[" << _name << " Thread] Exiting." << endl;