pub unsafe fn kevent<Fd: AsFd, Buf: Buffer<Event>>(
kqueue: Fd,
changelist: &[Event],
eventlist: Buf,
timeout: Option<Duration>,
) -> Result<Buf::Output>
Expand description
kevent(kqueue, changelist, eventlist, timeout)
—Wait for events on a
kqueue
.
This is a wrapper around kevent_timespec
which takes a Duration
instead of a Timespec
for the timemout value. Timespec
has a signed
i64
seconds field; if converting Duration
to Timespec
overflows,
None
is passed as the timeout instead, such such a large timeout would
be effectively infinite in practice.
§Safety
The file descriptors referred to by the Event
structs must be valid for
the lifetime of the kqueue
file descriptor.