guile-devel
[Top][All Lists]
Advanced

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

Re: Unexpectedly low read/write performance of open-pipe


From: Mark H Weaver
Subject: Re: Unexpectedly low read/write performance of open-pipe
Date: Tue, 09 Apr 2019 14:24:09 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux)

Hi Chris,

Chris Vine <address@hidden> writes:

> On Tue, 09 Apr 2019 04:35:38 -0400
> Mark H Weaver <address@hidden> 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



reply via email to

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