Skip to content

Commit 7adea66

Browse files
committed
Fixed #7762: Crash on "Operating system call pthread_mutex_destroy failed. Error code 16" in log
1 parent a654f38 commit 7adea66

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/common/classes/SyncObject.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,9 @@ class SyncObject : public Reasons
6262

6363
~SyncObject()
6464
{
65+
MutexLockGuard waitForWakeupThreads(mutex, FB_FUNCTION);
66+
// No actions - just lock / unlock is needed to prevent races
67+
// when sync object was destroyed before grantLocks() completion
6568
}
6669

6770
void lock(Sync* sync, SyncType type, const char* from)

0 commit comments

Comments
 (0)