mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Fix bug for downgrading cell locks
This commit is contained in:
1 file changed
+2
-2
@@ -121,7 +121,7 @@ unsafe impl RawRwLock for RawCellRwLock {
|
||||
|
||||
unsafe impl RawRwLockDowngrade for RawCellRwLock {
|
||||
unsafe fn downgrade(&self) {
|
||||
// no-op -- we're always exclusively locked for this thread
|
||||
self.state.set(ONE_READER);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -170,7 +170,7 @@ unsafe impl RawRwLockUpgradeDowngrade for RawCellRwLock {
|
||||
|
||||
#[inline]
|
||||
unsafe fn downgrade_to_upgradable(&self) {
|
||||
// no-op -- we're always exclusively locked for this thread
|
||||
self.state.set(ONE_READER);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user