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

Method debug_assert_all_non_requester_detached

crates/vm/src/vm/mod.rs:509–523  ·  view source on GitHub ↗
(&self, vm: &VirtualMachine)

Source from the content-addressed store, hash-verified

507
508 #[cfg(debug_assertions)]
509 fn debug_assert_all_non_requester_detached(&self, vm: &VirtualMachine) {
510 use thread::THREAD_SUSPENDED;
511 let requester = self.requester.load(Ordering::Relaxed);
512 let registry = vm.state.thread_frames.lock();
513 for (&id, slot) in registry.iter() {
514 if id == requester {
515 continue;
516 }
517 let state = slot.state.load(Ordering::Relaxed);
518 debug_assert!(
519 state != THREAD_SUSPENDED,
520 "non-requester thread still suspended after start-the-world: id={id} state={state}"
521 );
522 }
523 }
524}
525
526#[cfg(all(unix, feature = "threading"))]

Callers 1

start_the_worldMethod · 0.80

Calls 3

loadMethod · 0.45
lockMethod · 0.45
iterMethod · 0.45

Tested by

no test coverage detected