fix(PIThread): remove spurious unlock() in _waitForFinish
The function called unlock() on thread_mutex without a matching lock(), causing UB on Windows (releasing an unowned critical section) or silently dropping a user-held lock.
This commit is contained in:
@@ -1080,7 +1080,6 @@ bool PIThread::_waitForFinish(PISystemTime max_tm) {
|
|||||||
if (!running_) return true;
|
if (!running_) return true;
|
||||||
#ifdef WINDOWS
|
#ifdef WINDOWS
|
||||||
if (!isExists(PRIVATE->thread)) {
|
if (!isExists(PRIVATE->thread)) {
|
||||||
unlock();
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user