HomeFreeBSD

Since the socket is non-blocking, it is necessary to use select(2) even

Description

Since the socket is non-blocking, it is necessary to use select(2) even
when there is no timeout, because read(2) will return immediately if there
is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on
slow connections.

MFC after: 3 weeks
Noticed by: Yanhui Shen <shen.elf@gmail.com>

Details

Provenance
desAuthored on Apr 30 2012, 12:11 PM
Parents
rG671c0336232a: Remove incorrect __restrict qualifier on several pointers
Branches
Unknown
Tags
Unknown

Event Timeline