authorgravatar for jahe788@gmail.comIntegratedQuantum <jahe788@gmail.com> 2024-04-24 17:41:13+02:00
committergravatar for noreply@github.comGitHub <noreply@github.com> 2024-04-24 10:41:13-05:00
log1a6485d111d270014f57c46c53597a516a24dc47
treecff3180eb85c8d615ba14b992f2c2aad9d9f9fe1
parentf6f7a47aad7da251f1e4ee6f45b6de79ce8bbbd8
signaturebadge-check Signed by PGP key B5690EEEBB952194

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 {...@@ -41,7 +41,9 @@ pub fn tryLockShared(rwl: *RwLock) bool {
41 return rwl.impl.tryLockShared();41 return rwl.impl.tryLockShared();
42}42}
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.
45pub fn lockShared(rwl: *RwLock) void {47pub fn lockShared(rwl: *RwLock) void {
46 return rwl.impl.lockShared();48 return rwl.impl.lockShared();
47}49}