DragonFly BSD
DragonFly commits List (threaded) for 2012-11
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

git: libfetch: Use select(2) as a consequence of switching to non-blocking


From: John Marino <marino@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Fri, 2 Nov 2012 12:08:59 -0700 (PDT)

commit f3e2e424df47953bf38d1ac9bb133d7a037b3112
Author: John Marino <draco@marino.st>
Date:   Fri Nov 2 19:46:13 2012 +0100

    libfetch: Use select(2) as a consequence of switching to non-blocking
    
    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.
    
    Taken-from: FreeBSD SVN 234837 (30 APR 2012)

Summary of changes:
 lib/libfetch/common.c |   44 +++++++++++++++++++-------------------------
 1 files changed, 19 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f3e2e424df47953bf38d1ac9bb133d7a037b3112


-- 
DragonFly BSD source repository



[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]