guile-user
[Top][All Lists]
Advanced

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

Re: Nonblocking get-bytevector-n bug?


From: Marko Rauhamaa
Subject: Re: Nonblocking get-bytevector-n bug?
Date: Mon, 07 Dec 2015 12:28:54 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

address@hidden (Ludovic Courtès):

>> If you replace (get-bytevector-some port) with
>> (get-bytevector-n port 8192) or (get-bytevector-n! port bv 0 8192),
>> no partial data is returned.
>
> That’s because get-bytevector-n{,!} are specified as blocking if
> necessary until N bytes are read or EOF is reached.

Ok, the Guile manual description leaves it a ambiguous. Even the R6RS
wording could be graciously bent slightly to support the age-old
nonblocking semantics. It boils down to what bytes are considered
"available." I don't think any nonblocking application would mind those
functions returning immediately with what they managed to read.

Thanks for the answer.


Marko



reply via email to

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