Function rustix::event::kqueue::kevent

source ·
pub unsafe fn kevent(
    kqueue: impl AsFd,
    changelist: &[Event],
    eventlist: &mut Vec<Event>,
    timeout: Option<Duration>
) -> Result<usize>
Available on crate feature event only.
Expand description

kevent(kqueue, changelist, eventlist, timeout)—Wait for events on a kqueue.

Note: in order to receive events, make sure to allocate capacity in the eventlist! Otherwise, the function will return immediately.

§Safety

The file descriptors referred to by the Event structs must be valid for the lifetime of the kqueue file descriptor.

§References