#[unsafe(no_mangle)]pub unsafe extern "C" fn pamoja_event_bus_next_within(
bus: *const PamojaEventBus,
timeout_ms: u64,
out_event: *mut *mut PamojaBuffer,
out_timed_out: *mut bool,
) -> PamojaStatusExpand description
Waits for the next event on this endpoint, giving up after a time limit.
A wait that runs out takes no event, so the next one published is left for the next call.
§Arguments
bus- the endpoint to receive on.timeout_ms- how long to wait, in milliseconds, including any wait for another call on this endpoint to finish. A limit too far off to schedule waits aspamoja_event_bus_nextdoes.out_event- receives a buffer handle the caller must release withpamoja_buffer_free, or null when the time ran out.out_timed_out- receivestruewhen the time ran out.
§Returns
PamojaStatus::Ok whether an event arrived or the time ran out.
§Safety
bus must be a live handle, and out_event and out_timed_out must be
writable.