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

Method unlock

crates/common/src/lock/thread_mutex.rs:81–84  ·  view source on GitHub ↗

Unlocks this mutex. The inner mutex may not be unlocked if this mutex was acquired previously in the current thread. # Safety This method may only be called if the mutex is held by the current thread.

(&self)

Source from the content-addressed store, hash-verified

79 ///
80 /// This method may only be called if the mutex is held by the current thread.
81 pub unsafe fn unlock(&self) {
82 self.owner.store(0, Ordering::Relaxed);
83 unsafe { self.mutex.unlock() };
84 }
85}
86
87impl<R: RawMutex, G: GetThreadId> RawThreadMutex<R, G> {

Callers 8

dropMethod · 0.45
dropMethod · 0.45
release_lockFunction · 0.45
releaseMethod · 0.45
_release_saveMethod · 0.45
run_threadFunction · 0.45

Calls 1

storeMethod · 0.45

Tested by

no test coverage detected