[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Reading data from a file descriptor
From: |
tomas |
Subject: |
Re: Reading data from a file descriptor |
Date: |
Mon, 20 Jun 2016 12:58:38 +0200 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Mon, Jun 20, 2016 at 12:40:53PM +0200, Andy Wingo wrote:
> 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:
[...]
> >> > guile's R6RS implementation has get-bytevector-some, which will do
> >> > that for you, with unix-read-like behaviour.
[...]
> > 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?
Assuming I understood everything involved -- yes, it sounds spot-on.
Thanks
- - t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.12 (GNU/Linux)
iEYEARECAAYFAldnzF4ACgkQBcgs9XrR2kbbkQCeJtkFrSRYBz9UTX9+pO1v7E3r
hKYAn03UD5dhTe9hPpYusaBqTYOu2MbW
=WJhe
-----END PGP SIGNATURE-----