Fixed windows deadlocks, performance is shit tho
This commit is contained in:
@@ -84,6 +84,9 @@ private:
|
||||
if (it->second == Mode::Shared && mode == Mode::Exclusive) {
|
||||
releaseInternal(); // Release the old shared lock
|
||||
activeLocks.erase(it);
|
||||
// Small delay to allow OS to process the unlock before re-locking
|
||||
// This prevents deadlock when multiple threads upgrade simultaneously
|
||||
Sleep(1);
|
||||
} else {
|
||||
// Already hold compatible or same lock
|
||||
locked = true;
|
||||
|
||||
Reference in New Issue
Block a user