We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 98d027c + 776be7e commit a077e44Copy full SHA for a077e44
library/std/src/sys/unix/rwlock.rs
@@ -48,9 +48,9 @@ impl RWLock {
48
}
49
panic!("rwlock read lock would result in deadlock");
50
} else {
51
- // According to POSIX, for a properly initialized rwlock this can only
52
- // return EAGAIN or EDEADLK or 0. We rely on that.
53
- debug_assert_eq!(r, 0);
+ // POSIX does not make guarantees about all the errors that may be returned.
+ // See issue #94705 for more details.
+ assert_eq!(r, 0, "unexpected error during rwlock read lock: {:?}", r);
54
self.num_readers.fetch_add(1, Ordering::Relaxed);
55
56
0 commit comments