readWakeup

fnint readWakeup(Handle handle, out eventfd_t counter) @trusted nothrow @nogc

Read and reset an eventfd counter.

Reads the current eventfd counter value and resets it to zero, consuming the wakeup notification. This should be called when the eventfd becomes readable.

Parameters

handleThe eventfd handle to read from.
counterOutput parameter receiving the counter value before reset.

Returns

0 on success, or -1 with errno set on failure (e.g., EAGAIN

if the counter is currently zero).