We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 82cb15e commit 702c9afCopy full SHA for 702c9af
library/std/src/sys/sync/rwlock/futex.rs
@@ -217,7 +217,10 @@ impl RwLock {
217
/// in at least 2 threads will deadlock.
218
#[inline]
219
pub unsafe fn try_upgrade(&self) -> bool {
220
- debug_assert!(is_read_locked(self.state), "RwLock must be read locked to call `try_upgrade`");
+ debug_assert!(
221
+ is_read_locked(self.state), "\
222
+ RwLock must be read locked to call `try_upgrade`"
223
+ );
224
self.state.compare_exchange(READ_LOCKED, WRITE_LOCKED, Acquire, Relaxed).is_ok()
225
}
226
0 commit comments