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

Function get_missing

crates/vm/src/stdlib/sys/monitoring.rs:144–153  ·  view source on GitHub ↗

Get the MISSING sentinel, creating it if necessary.

(vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

142
143/// Get the MISSING sentinel, creating it if necessary.
144pub fn get_missing(vm: &VirtualMachine) -> PyObjectRef {
145 let mut state = vm.state.monitoring.lock();
146 if let Some(ref m) = state.missing {
147 m.clone()
148 } else {
149 let m: PyObjectRef = sys_monitoring::MonitoringSentinel.into_ref(&vm.ctx).into();
150 state.missing = Some(m.clone());
151 m
152 }
153}
154
155/// Get the DISABLE sentinel, creating it if necessary.
156pub fn get_disable(vm: &VirtualMachine) -> PyObjectRef {

Callers 3

execute_instrumentedMethod · 0.85
missingFunction · 0.85

Calls 4

SomeClass · 0.50
lockMethod · 0.45
cloneMethod · 0.45
into_refMethod · 0.45

Tested by

no test coverage detected