MCPcopy Index your code
hub / github.com/RustPython/RustPython / try_upgrade

Method try_upgrade

crates/common/src/lock/cell_lock.rs:161–168  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

159
160 #[inline]
161 unsafe fn try_upgrade(&self) -> bool {
162 if self.state.get() == ONE_READER {
163 self.state.set(WRITER_BIT);
164 true
165 } else {
166 false
167 }
168 }
169}
170
171unsafe impl RawRwLockUpgradeDowngrade for RawCellRwLock {

Callers 1

upgradeMethod · 0.45

Calls 2

getMethod · 0.45
setMethod · 0.45

Tested by

no test coverage detected