Skip to main content

## memory_atomic_notify

# Function memory_atomic_notify

Source

    pub unsafe fn memory_atomic_notify(ptr: *mut i32, waiters: u32) -> u32

🔬This is a nightly-only experimental API. (`stdarch_wasm_atomic_wait` #77839)
Available on `target_family=wasm` and WebAssembly and target feature `atomics` only.
Expand description

Corresponding intrinsic to wasm’s `memory.atomic.notify` instruction

This function will notify a number of threads blocked on the address indicated by `ptr`. Threads previously blocked with the `i32_atomic_wait` and `i64_atomic_wait` functions above will be woken up.

The `waiters` argument indicates how many waiters should be woken up (a maximum). If the value is zero no waiters are woken up.

## §Return value

Returns the number of waiters which were actually notified.