GNU bug report logs -
#30066
'get-bytevector-some' returns only 1 byte from unbuffered ports
Previous Next
Reported by: ludo <at> gnu.org (Ludovic Courtès)
Date: Wed, 10 Jan 2018 15:03:02 UTC
Severity: normal
Tags: notabug
Done: ludo <at> gnu.org (Ludovic Courtès)
Bug is archived. No further changes may be made.
Full log
View this message in rfc822 format
Ah, thanks for that work!
On Thu, Jan 11, 2018 at 1:26 AM, Andy Wingo <wingo <at> igalia.com> wrote:
> On Wed 10 Jan 2018 17:58, Nala Ginrut <nalaginrut <at> gmail.com> writes:
>
>> hi Andy and Ludo!
>>
>> What if developers enabled suspendable-ports and set the port to non-blocking?
>> For example, in the non-blocking asynchronous server, I registered
>> read/write waiter for suspendable-ports. And save
>> delimited-continuations then yield the current task.
>> In this situation, get-bytevector-n! will read n bytes with several
>> times yielding by the registered read-writer, from the caller's
>> perspective, get-bytevector-n! will return n bytes finally no matter
>> how many times it's yielded.
>> But how about the get-bytevector-some? Should it block just once and
>> return the first time read m bytes then return?
>
> I think this is right. At most one block. FWIW we'd need to add
> support for get-bytevector-some to (ice-9 suspendable-ports) to get this
> to work.
>
> Andy
This bug report was last modified 7 years and 99 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.