version 2.33.0

piMinSleep() method
This commit is contained in:
2021-11-16 14:43:57 +03:00
parent 48c885e12a
commit a2a205cfd2
12 changed files with 28 additions and 26 deletions

View File

@@ -402,7 +402,7 @@ bool PIThread::waitForFinish(int timeout_msecs) {
if (!running_) return true;
if (timeout_msecs < 0) {
while (running_) {
piMSleep(PIP_MIN_MSLEEP);
piMinSleep();
#ifdef WINDOWS
if (!isExists(PRIVATE->thread)) {
unlock();
@@ -414,7 +414,7 @@ bool PIThread::waitForFinish(int timeout_msecs) {
}
tmf_.reset();
while (running_ && tmf_.elapsed_m() < timeout_msecs) {
piMSleep(PIP_MIN_MSLEEP);
piMinSleep();
#ifdef WINDOWS
if (!isExists(PRIVATE->thread)) {
unlock();
@@ -430,12 +430,12 @@ bool PIThread::waitForStart(int timeout_msecs) {
if (running_) return true;
if (timeout_msecs < 0) {
while (!running_)
piMSleep(PIP_MIN_MSLEEP);
piMinSleep();
return true;
}
tms_.reset();
while (!running_ && tms_.elapsed_m() < timeout_msecs)
piMSleep(PIP_MIN_MSLEEP);
piMinSleep();
return tms_.elapsed_m() < timeout_msecs;
}