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

Method new

crates/vm/src/vm/mod.rs:194–213  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

192#[cfg(all(unix, feature = "threading"))]
193impl StopTheWorldState {
194 pub const fn new() -> Self {
195 Self {
196 requested: AtomicBool::new(false),
197 world_stopped: AtomicBool::new(false),
198 requester: AtomicU64::new(0),
199 notify_mutex: std::sync::Mutex::new(()),
200 notify_cv: std::sync::Condvar::new(),
201 thread_countdown: AtomicI64::new(0),
202 stats_stop_calls: AtomicU64::new(0),
203 stats_last_wait_ns: AtomicU64::new(0),
204 stats_total_wait_ns: AtomicU64::new(0),
205 stats_max_wait_ns: AtomicU64::new(0),
206 stats_poll_loops: AtomicU64::new(0),
207 stats_attached_seen: AtomicU64::new(0),
208 stats_forced_parks: AtomicU64::new(0),
209 stats_suspend_notifications: AtomicU64::new(0),
210 stats_attach_wait_yields: AtomicU64::new(0),
211 stats_suspend_wait_yields: AtomicU64::new(0),
212 }
213 }
214
215 /// Wake the stop-the-world requester (called by each thread that suspends).
216 pub(crate) fn notify_suspended(&self) {

Callers

nothing calls this directly

Calls 12

newFunction · 0.85
new_signal_handlersFunction · 0.85
new_dictMethod · 0.80
noneMethod · 0.80
hash_strMethod · 0.80
interned_strMethod · 0.80
init_dictMethod · 0.80
intern_strMethod · 0.80
SomeClass · 0.50
to_ownedMethod · 0.45
hashMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected