Skip to main content

futex_wait

Function futex_wait 

Source
pub fn futex_wait(
    futex: &Atomic<u32>,
    expected: u32,
    timeout: Option<Duration>,
) -> bool
Available on (Android or FreeBSD or Linux) and (Android, or DragonFly BSD, or FreeBSD, or Fuchsia, or Linux, or OpenBSD, or Emscripten and target feature atomics) only.
Expand description

Waits for a futex_wake operation to wake us.

Returns directly if the futex doesn’t hold the expected value.

Returns false on timeout, and true in all other cases.