Skip to main content

reads_without_waiting

Function reads_without_waiting 

Source
pub fn reads_without_waiting(fd: Borrowed<'_>) -> bool
Expand description

Whether a read from fd answers from data the file already holds, rather than waiting for whoever writes the other end.

Seeking answers this everywhere but Windows, where a pipe seeks too – lseek on one succeeds and reports a position, so a reader that took seekability for an answer would wait on a peer while holding whatever it holds for the length of the call.