pub(crate) fn validate_scheduler_invariants()Expand description
Validate scheduler-wide invariants in debug builds.
Uses try_lock everywhere so it can be called from finish_switch without
blocking. Silently skips if any lock is contended.
Panics with a diagnostic message on the first invariant violation.