[go: up one dir, main page]

loom 0.5.0

Permutation testing for concurrent code
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//! Mocked versions of [`std::hint`] functions.

/// Signals the processor that it is entering a busy-wait spin-loop.
pub fn spin_loop() {
    crate::sync::atomic::spin_loop_hint();
}

/// Informs the compiler that this point in the code is not reachable, enabling
/// further optimizations.
///
/// Loom's wrapper of this function unconditionally panics.
#[track_caller]
pub unsafe fn unreachable_unchecked() -> ! {
    unreachable!("unreachable_unchecked was reached!");
}