authorgravatar for jahe788@gmail.comIntegratedQuantum <jahe788@gmail.com> 2024-04-24 17:41:13+02:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-04-24 13:45:29-07:00
log4babedf1bee40dbfaa0675c43e460125ba75ad82
tree4e44155341c9f41ac319da803bfef231931ceeaa
parent0dc64d906449f2fa66d2411cc18ab4b53d1efa19

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


1 files changed, 3 insertions(+), 1 deletions(-)

lib/std/Thread/RwLock.zig+3-1
......@@ -41,7 +41,9 @@ pub fn tryLockShared(rwl: *RwLock) bool {
4141 return rwl.impl.tryLockShared();
4242}
4343
44/// Blocks until shared lock ownership is acquired.
44/// Obtains shared lock ownership.
45/// Blocks if another thread has exclusive ownership.
46/// May block if another thread is attempting to get exclusive ownership.
4547pub fn lockShared(rwl: *RwLock) void {
4648 return rwl.impl.lockShared();
4749}