[][src]Function core::hint::spin_loop

pub fn spin_loop()
🔬 This is a nightly-only experimental API. (renamed_spin_loop #55002)

Emits a machine instruction hinting to the processor that it is running in busy-wait spin-loop ("spin lock").

For a discussion of different locking strategies and their trade-offs, see core::sync::atomic::spin_loop_hint.

Note: On platforms that do not support receiving spin-loop hints this function does not do anything at all.