guile-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Bindings for ‘sendfile’


From: Thien-Thi Nguyen
Subject: Re: [PATCH] Bindings for ‘sendfile’
Date: Tue, 09 Apr 2013 10:33:25 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux)

() address@hidden (Ludovic Courtès)
() Sun, 07 Apr 2013 21:53:26 +0200

   +In other cases, the libc function may send fewer bytes than
   address@hidden instance because @var{out} is a slow or limited
   +device, such as a pipe.  When that happens, Guile's @code{sendfile}
   +automatically retries until exactly @var{count} bytes were sent or an
   +error occurs.

A short write is an opportunity for the caller to Do Something Else
(i.e., go asynchronous).  I think that is more useful than internalizing
the looping.  To accomodate both usage patterns, you could leave the
low-level proc as-is (as-was :-D) and provide another proc that loops.

-- 
Thien-Thi Nguyen
GPG key: 4C807502

Attachment: pgpQuHJZnXwHS.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]