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

Function _setprofileallthreads

crates/vm/src/stdlib/sys.rs:1388–1393  ·  view source on GitHub ↗
(profilefunc: PyObjectRef, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

1386
1387 #[pyfunction]
1388 fn _setprofileallthreads(profilefunc: PyObjectRef, vm: &VirtualMachine) {
1389 let func = (!vm.is_none(&profilefunc)).then(|| profilefunc.clone());
1390 *vm.state.global_profile_func.lock() = func;
1391 vm.profile_func.replace(profilefunc);
1392 update_use_tracing(vm);
1393 }
1394
1395 #[cfg(feature = "threading")]
1396 #[pyattr]

Callers

nothing calls this directly

Calls 6

update_use_tracingFunction · 0.85
thenMethod · 0.45
is_noneMethod · 0.45
cloneMethod · 0.45
lockMethod · 0.45
replaceMethod · 0.45

Tested by

no test coverage detected