fixes
This commit is contained in:
@@ -279,7 +279,7 @@ bool _PITimerImp_Thread::startTimer(double interval_ms) {
|
|||||||
bool _PITimerImp_Thread::stopTimer(bool wait) {
|
bool _PITimerImp_Thread::stopTimer(bool wait) {
|
||||||
thread_.stop();
|
thread_.stop();
|
||||||
event.notifyAll();
|
event.notifyAll();
|
||||||
if (wait) return thread_.waitForFinish();
|
thread_.waitForFinish();
|
||||||
// if (wait)
|
// if (wait)
|
||||||
// if (!thread_.waitForFinish(10))
|
// if (!thread_.waitForFinish(10))
|
||||||
// if (thread_.isRunning())
|
// if (thread_.isRunning())
|
||||||
@@ -368,9 +368,12 @@ void _PITimerImp_Thread::adjustTimes() {
|
|||||||
|
|
||||||
|
|
||||||
bool _PITimerImp_Thread::smallWait(int ms) {
|
bool _PITimerImp_Thread::smallWait(int ms) {
|
||||||
|
if (thread_.isStopping()) return false;
|
||||||
|
if (ms > 0) {
|
||||||
thread_.mutex().lock();
|
thread_.mutex().lock();
|
||||||
event.waitFor(thread_.mutex(), ms);
|
event.waitFor(thread_.mutex(), ms);
|
||||||
thread_.mutex().unlock();
|
thread_.mutex().unlock();
|
||||||
|
}
|
||||||
return !thread_.isStopping();
|
return !thread_.isStopping();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,6 @@ void Daemon::Remote::shellClose() {
|
|||||||
if (!term) return;
|
if (!term) return;
|
||||||
piCoutObj << "shell close";
|
piCoutObj << "shell close";
|
||||||
term_timer.stop();
|
term_timer.stop();
|
||||||
term_timer.waitForFinish(1000);
|
|
||||||
term->destroy();
|
term->destroy();
|
||||||
delete term;
|
delete term;
|
||||||
term = 0;
|
term = 0;
|
||||||
@@ -331,6 +330,7 @@ Daemon::~Daemon() {
|
|||||||
delete r;
|
delete r;
|
||||||
}
|
}
|
||||||
remotes.clear();
|
remotes.clear();
|
||||||
|
delete _self;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user