summaryrefslogtreecommitdiffstats
path: root/src/Thread.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/Thread.cpp')
-rw-r--r--src/Thread.cpp11
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)
{