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

Function release_lock_after_fork_parent

crates/vm/src/stdlib/_imp.rs:41–45  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

39 }
40
41 pub(super) fn release_lock_after_fork_parent() {
42 if IMP_LOCK.is_locked() && IMP_LOCK.is_owned_by_current_thread() {
43 unsafe { IMP_LOCK.unlock() };
44 }
45 }
46
47 /// Reset import lock after fork() — only if held by a dead thread.
48 ///

Callers 1

Calls 2

is_lockedMethod · 0.80
unlockMethod · 0.45

Tested by

no test coverage detected