Timer: actually join thread

This commit is contained in:
Michael Davidsaver
2017-06-02 11:03:46 +02:00
parent e4c7fa6a1c
commit e82489b158
2 changed files with 1 additions and 4 deletions

View File

@@ -32,7 +32,6 @@ TimerCallback::TimerCallback()
Timer::Timer(string threadName,ThreadPriority priority)
: waitForWork(false),
waitForDone(false),
alive(true),
thread(threadName,priority,this)
{}
@@ -139,7 +138,6 @@ void Timer::run()
waitForWork.wait(delay);
}
}
waitForDone.signal();
}
Timer::~Timer() {
@@ -148,7 +146,7 @@ Timer::~Timer() {
alive = false;
}
waitForWork.signal();
waitForDone.wait();
thread.exitWait();
TimerCallbackPtr timerCallback;
while(true) {
timerCallback = head;