From adbad7fcffe9fab239da23b846091e88586b3846 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 15 Aug 2012 22:26:54 +0000 Subject: Remove more dead code from Raul::Thread. git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4707 a436a847-0d15-0410-975c-d299462d15a1 --- src/Thread.cpp | 20 +++----------------- 1 file changed, 3 insertions(+), 17 deletions(-) (limited to 'src') 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; } -- cgit v1.2.1