()
| 192 | #[cfg(all(unix, feature = "threading"))] |
| 193 | impl 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) { |
nothing calls this directly
no test coverage detected