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