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

Method reinit_after_fork

crates/vm/src/gc_state.rs:837–855  ·  view source on GitHub ↗
(&self)

Source from the content-addressed store, hash-verified

835 /// threads exist. The calling thread must NOT hold any of these locks.
836 #[cfg(all(unix, feature = "threading"))]
837 pub unsafe fn reinit_after_fork(&self) {
838 use crate::common::lock::{reinit_mutex_after_fork, reinit_rwlock_after_fork};
839
840 unsafe {
841 reinit_mutex_after_fork(&self.collecting);
842 reinit_mutex_after_fork(&self.garbage);
843 reinit_mutex_after_fork(&self.callbacks);
844
845 for generation in &self.generations {
846 generation.reinit_stats_after_fork();
847 }
848 self.permanent.reinit_stats_after_fork();
849
850 for rw in &self.generation_lists {
851 reinit_rwlock_after_fork(rw);
852 }
853 reinit_rwlock_after_fork(&self.permanent_list);
854 }
855 }
856}
857
858/// Get a reference to the GC state.

Callers

nothing calls this directly

Calls 3

reinit_mutex_after_forkFunction · 0.85
reinit_rwlock_after_forkFunction · 0.85

Tested by

no test coverage detected