diff options
author | David Robillard <d@drobilla.net> | 2012-08-16 00:59:35 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-08-16 00:59:35 +0000 |
commit | 2f719c364449f3e338822e7cc740daac0870cbc9 (patch) | |
tree | 349be87a97baf7a48d5c42fc45c1ed5fa006c225 /src | |
parent | adbad7fcffe9fab239da23b846091e88586b3846 (diff) | |
download | raul-2f719c364449f3e338822e7cc740daac0870cbc9.tar.gz raul-2f719c364449f3e338822e7cc740daac0870cbc9.tar.bz2 raul-2f719c364449f3e338822e7cc740daac0870cbc9.zip |
Remove Raul::Slave class.
Merge Thread::stop() and Thread::join().
Clean thread shut down without the use of pthread_cancel().
git-svn-id: http://svn.drobilla.net/lad/trunk/raul@4708 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/Thread.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/Thread.cpp b/src/Thread.cpp index 1f85ce0..d299138 100644 --- a/src/Thread.cpp +++ b/src/Thread.cpp @@ -43,7 +43,7 @@ Thread::Thread(const std::string& name) Thread::~Thread() { - stop(); + join(); delete _impl; } @@ -72,23 +72,16 @@ Thread::start() } void -Thread::stop() +Thread::join() { if (_thread_exists) { _exit_flag = true; - pthread_cancel(_impl->pthread); pthread_join(_impl->pthread, NULL); _thread_exists = false; LOG(info) << "Exiting thread" << endl; } } -void -Thread::join() -{ - pthread_join(_impl->pthread, NULL); -} - bool Thread::set_scheduling(bool realtime, unsigned priority) { |