Hi Chris, Chris Vine <vine35792...@gmail.com> writes:
> On Tue, 09 Apr 2019 04:35:38 -0400 > Mark H Weaver <m...@netris.org> wrote: >> >> I think it's probably fine for 2.2, although a more careful check should >> be made for differences in behavior between the old and new >> implementations, and tests should be added. I'll try to get to it soon. > > If it is going in 2.2 (or 3.0) it would be nice if the ports could be > suspendable. put-bytevector (used by write!) is suspendable; > get-bytevector-some (used by read!) is not. Unless I'm mistaken, nothing done within custom ports is suspendable, regardless of which I/O primitives are used, because the custom port implementations themselves are all written in C. The custom port handlers such as 'read!' and 'write!' are always invoked from C code. Caleb Ristvedt recently ran into this problem and posted about it on guile-user: https://lists.gnu.org/archive/html/guile-user/2019-03/msg00032.html I responded here: https://lists.gnu.org/archive/html/guile-user/2019-04/msg00000.html I'm not sure off-hand what would be required to re-implement custom ports in suspendable Scheme code. Andy Wingo would be a good person to ask, since he implemented (ice-9 suspendable-ports). Mark