guile-devel
[Top][All Lists]
Advanced

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

Re: Reading data from a file descriptor


From: Andy Wingo
Subject: Re: Reading data from a file descriptor
Date: Mon, 20 Jun 2016 12:40:53 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

On Tue 17 Nov 2015 14:55, Chris Vine <address@hidden> writes:

> On Tue, 17 Nov 2015 13:52:21 +0100
>> On Tue, Nov 17, 2015 at 12:59:56PM +0000, Chris Vine wrote:
>> > On Tue, 17 Nov 2015 10:53:19 +0100  
>> 
>> [...]
>> 
>> > guile's R6RS implementation has get-bytevector-some, which will do
>> > that for you, with unix-read-like behaviour.  
>> 
>> Thank you a thousand. You made me happy :-)
>
> I suppose it is worth adding that it might not be optimally efficient
> for all uses, as there is no get-bytevector-some! procedure which
> modifies an existing bytevector and takes a maximum length value.  I
> guess it is a matter of 'suck it and see', efficiency-wise.

I would be happy to support such an interface though.  I guess it would
take a keyword or optional argument indicating a minimum number of bytes
to fill, and if that number is 0 it would never block; sound about
right?

Andy



reply via email to

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