change last logic to PIThreadNotifier

This commit is contained in:
2025-01-15 18:38:50 +03:00
parent 5755d172cd
commit 82cda42e75
3 changed files with 6 additions and 10 deletions

View File

@@ -118,7 +118,7 @@ void PIThreadNotifier::wait() {
bool PIThreadNotifier::waitFor(PISystemTime timeout) {
bool ret = false;
m.lock();
v.waitFor(m, timeout);
if (cnt == 0) v.waitFor(m, timeout);
if (cnt > 0) {
cnt--;
ret = true;