Equivalent of the WebAssembly `memory.atomic.wait32` instruction for this shared memory. This method allows embedders to block the current thread until notified via the `memory.atomic.notify` instruction or the [`SharedMemory::atomic_notify`] method, enabling synchronization with the wasm guest as desired. The `expected` argument is the expected 32-bit value to be stored at the byte address `add
(
&self,
addr: u64,
expected: u32,
timeout: Option<Duration>,
)
| 1032 | /// This function will return an error if `addr` is not within bounds or |
| 1033 | /// not aligned to a 4-byte boundary. |
| 1034 | pub fn atomic_wait32( |
| 1035 | &self, |
| 1036 | addr: u64, |
| 1037 | expected: u32, |
| 1038 | timeout: Option<Duration>, |
| 1039 | ) -> Result<WaitResult, Trap> { |
| 1040 | self.vm.atomic_wait32(addr, expected, timeout) |
| 1041 | } |
| 1042 | |
| 1043 | /// Equivalent of the WebAssembly `memory.atomic.wait64` instruction for |
| 1044 | /// this shared memory. |
no outgoing calls