diff options
author | David Robillard <d@drobilla.net> | 2012-08-15 22:26:54 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-15 22:26:54 +0000 |
commit | adbad7fcffe9fab239da23b846091e88586b3846 (patch) | |
tree | 85145e1a7963432bb81c9d9f50486d1418525fce /src | |
parent | 7f5e8664ea8e5e2ee580c093aa61b4451b2578a5 (diff) | |
download | raul-adbad7fcffe9fab239da23b846091e88586b3846.tar.gz raul-adbad7fcffe9fab239da23b846091e88586b3846.tar.bz2 raul-adbad7fcffe9fab239da23b846091e88586b3846.zip |
Remove more dead code from Raul::Thread.
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4707 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/Thread.cpp | 20 |
1 files changed, 3 insertions, 17 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp index f5969d6..1f85ce0 100644 --- a/src/Thread.cpp +++ b/src/Thread.cpp @@ -37,22 +37,10 @@ Thread::Thread(const std::string& name) : _impl(new ThreadImpl()) , _name(name) , _thread_exists(false) - , _own_thread(true) , _exit_flag(false) { } -/** Must be called from thread */ -Thread::Thread(pthread_t thread, const std::string& name) - : _impl(new ThreadImpl()) - , _name(name) - , _thread_exists(true) - , _own_thread(false) - , _exit_flag(false) -{ - _impl->pthread = thread; -} - Thread::~Thread() { stop(); @@ -87,11 +75,9 @@ void Thread::stop() { if (_thread_exists) { - if (_own_thread) { - _exit_flag = true; - pthread_cancel(_impl->pthread); - pthread_join(_impl->pthread, NULL); - } + _exit_flag = true; + pthread_cancel(_impl->pthread); + pthread_join(_impl->pthread, NULL); _thread_exists = false; LOG(info) << "Exiting thread" << endl; } |