zig

fork of https://codeberg.org/ziglang/zig
Log | Files | Refs | README | LICENSE

commit 4babedf1bee40dbfaa0675c43e460125ba75ad82 (tree)
parent 0dc64d906449f2fa66d2411cc18ab4b53d1efa19
Author: IntegratedQuantum <43880493+IntegratedQuantum@users.noreply.github.com>
Date:   Wed, 24 Apr 2024 17:41:13 +0200

Clarify the blocking behavior of `RwLock.lockShared()`. (#19752)


Diffstat:
Mlib/std/Thread/RwLock.zig | 4+++-
1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lib/std/Thread/RwLock.zig b/lib/std/Thread/RwLock.zig @@ -41,7 +41,9 @@ pub fn tryLockShared(rwl: *RwLock) bool { return rwl.impl.tryLockShared(); } -/// Blocks until shared lock ownership is acquired. +/// Obtains shared lock ownership. +/// Blocks if another thread has exclusive ownership. +/// May block if another thread is attempting to get exclusive ownership. pub fn lockShared(rwl: *RwLock) void { return rwl.impl.lockShared(); }