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

Method notify_suspended

crates/vm/src/vm/mod.rs:216–223  ·  view source on GitHub ↗

Wake the stop-the-world requester (called by each thread that suspends).

(&self)

Source from the content-addressed store, hash-verified

214
215 /// Wake the stop-the-world requester (called by each thread that suspends).
216 pub(crate) fn notify_suspended(&self) {
217 self.stats_suspend_notifications
218 .fetch_add(1, Ordering::Relaxed);
219 // Synchronize with requester wait loop to avoid lost wakeups.
220 let _guard = self.notify_mutex.lock().unwrap();
221 self.decrement_thread_countdown(1);
222 self.notify_cv.notify_one();
223 }
224
225 #[inline]
226 fn init_thread_countdown(&self, vm: &VirtualMachine) -> i64 {

Callers 1

do_suspendFunction · 0.80

Calls 3

unwrapMethod · 0.45
lockMethod · 0.45

Tested by

no test coverage detected