portable_atomic

Module hint

Source
Expand description

Re-export of the core::hint module.

The only difference from the core::hint module is that spin_loop is available in all rust versions that this crate supports.

use portable_atomic::hint;

hint::spin_loop();

Re-exports§

  • pub use core::hint::*;

Functions§

  • Emits a machine instruction to signal the processor that it is running in a busy-wait spin-loop (“spin lock”).