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

Function py_os_after_fork_parent

crates/vm/src/stdlib/posix.rs:864–873  ·  view source on GitHub ↗
(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

862 }
863
864 fn py_os_after_fork_parent(vm: &VirtualMachine) {
865 #[cfg(feature = "threading")]
866 vm.state.stop_the_world.start_the_world(vm);
867
868 #[cfg(feature = "threading")]
869 crate::stdlib::_imp::release_imp_lock_after_fork_parent();
870
871 let after_forkers_parent: Vec<PyObjectRef> = vm.state.after_forkers_parent.lock().clone();
872 run_at_forkers(after_forkers_parent, false, vm);
873 }
874
875 /// Best-effort number of OS threads in this process.
876 /// Returns <= 0 when unavailable.

Callers 1

forkFunction · 0.85

Calls 5

run_at_forkersFunction · 0.85
start_the_worldMethod · 0.80
cloneMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected