diff options
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) { |