Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
loom 0.5.1 - Docs.rs
[go: Go Back, main page]

loom 0.5.1

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!");
}