Address waits v0.1.0
WaitOnAddress and the calls that wake its waiters.
WaitOnAddress
pub extern func WaitOnAddress(
address: *opaque,
compareAddress: *opaque,
addressSize: uint64,
milliseconds: uint32
) -> bool32
Waits for the value at an address to change.
See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-waitonaddress
Parameters
| Name | Type | Description |
|---|---|---|
address | *opaque | the value to wait on |
compareAddress | *opaque | a copy of the value the caller last saw; the wait ends at once when they differ |
addressSize | uint64 | the value's size in bytes: 1, 2, 4 or 8 |
milliseconds | uint32 | how long to wait at most, or INFINITE |
Returns: non-zero after a wake, and zero on time-out or failure with the reason in GetLastError
WakeByAddressSingle
pub extern func WakeByAddressSingle(address: *opaque)
Wakes one thread waiting on an address.
See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddresssingle
Parameters
| Name | Type | Description |
|---|---|---|
address | *opaque | the value it waits on |
WakeByAddressAll
pub extern func WakeByAddressAll(address: *opaque)
Wakes every thread waiting on an address.
See also: https://learn.microsoft.com/en-us/windows/win32/api/synchapi/nf-synchapi-wakebyaddressall
Parameters
| Name | Type | Description |
|---|---|---|
address | *opaque | the value they wait on |