RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-16 Thread Maxime Devos
>> 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

Re: [PATCH] Make get-bytevector-all suspendable.

2024-06-16 Thread Ludovic Courtès
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

RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Maxime Devos
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.

RE: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Maxime Devos
>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

Re: [PATCH] Make get-bytevector-all suspendable.

2024-06-01 Thread Ludovic Courtès
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

[PATCH] Make get-bytevector-all suspendable.

2023-07-20 Thread Christopher Baines
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