Function nix::poll::poll[][src]

pub fn poll(fds: &mut [PollFd], timeout: c_int) -> Result<c_int>

poll waits for one of a set of file descriptors to become ready to perform I/O. (poll(2))

fds contains all PollFd to poll. The function will return as soon as any event occur for any of these PollFds.

The timeout argument specifies the number of milliseconds that poll() should block waiting for a file descriptor to become ready. The call will block until either:

Note that the timeout interval will be rounded up to the system clock granularity, and kernel scheduling delays mean that the blocking interval may overrun by a small amount. Specifying a negative value in timeout means an infinite timeout. Specifying a timeout of zero causes poll() to return immediately, even if no file descriptors are ready.