mmr_event_wait()

Wait until an event is available

Synopsis:

#include <mm/events.h>
int mmr_event_wait(mmr_context_t *ctxt)

Arguments:

ctxt
A context handle

Library:

mmrndclient

Description:

Wait for an event. This function usually blocks until an event occurs, at which point it unblocks and you can call mmr_event_get() to get the event details.

Typically, you call mmr_event_wait() within an event-processing loop, right before calling mmr_event_get().

Note: This function is thread-safe only when using different context handles in each call. It's neither interrupt handler-safe nor signal-handler safe.

Returns:

Zero on success, or -1 on failure (check errno).