>> It currently is difficult to write a correct implementation of
>> get-bytevector-all in pure Scheme, because ‘get-bytevector-all’ needs to
>> return a _fresh_ bytevector and could return twice (e.g. in case of
>> system-async-mark + call-with-prompt shenanigans). I think the proposed
>> impl
Hi Maxime,
Maxime Devos skribis:
> It currently is difficult to write a correct implementation of
> get-bytevector-all in pure Scheme, because ‘get-bytevector-all’ needs to
> return a _fresh_ bytevector and could return twice (e.g. in case of
> system-async-mark + call-with-prompt shenanigans
Adding to my previous response:
Most (all?) tests for suspendable/non-suspendable are shared, and run in both
cases, so probably the suspendable get-bytevector-all already has tests.
>Given that ‘get-bytevector-n!’ already has a variant in
suspendable-ports.scm, my preference would be to rewrite
‘get-bytevector-all’ in Scheme (patch attached). That way, it would
naturally be suspendable. (It’s also in line with the general strategy
of moving things to Scheme.)
It currently i
Hi Chris,
Christopher Baines skribis:
> I'm looking at this since it's used in (web response)
> read-response-body.
>
> * module/ice-9/suspendable-ports.scm (get-bytevector-all): New
> procedure.
> (port-bindings): Add it.
Given that ‘get-bytevector-n!’ already has a variant in
suspendable-port
I'm looking at this since it's used in (web response)
read-response-body.
* module/ice-9/suspendable-ports.scm (get-bytevector-all): New
procedure.
(port-bindings): Add it.
---
module/ice-9/suspendable-ports.scm | 36 ++
1 file changed, 36 insertions(+)
diff --git a/m