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

Function after_fork_child_reinit_and_release

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

Source from the content-addressed store, hash-verified

67 /// 2) if current thread owns the lock, release it.
68 #[cfg(unix)]
69 pub(super) unsafe fn after_fork_child_reinit_and_release() {
70 unsafe { reinit_after_fork() };
71 if IMP_LOCK.is_locked() && IMP_LOCK.is_owned_by_current_thread() {
72 unsafe { IMP_LOCK.unlock() };
73 }
74 }
75}
76
77/// Re-export for fork safety code in posix.rs

Callers 1

Calls 3

reinit_after_forkFunction · 0.85
is_lockedMethod · 0.80
unlockMethod · 0.45

Tested by

no test coverage detected