Fix counting in SingleThreadedRwLock's tryLockShared (#16560)
Additionally we add RwLock to Thread.zig's list of tests
This commit is contained in:
@@ -95,7 +95,11 @@ pub const SingleThreadedRwLock = struct {
|
||||
rwl.shared_count = 1;
|
||||
return true;
|
||||
},
|
||||
.locked_exclusive, .locked_shared => return false,
|
||||
.locked_shared => {
|
||||
rwl.shared_count += 1;
|
||||
return true;
|
||||
},
|
||||
.locked_exclusive => return false,
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user