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

Re: char-ready? => read-char-ready?



The only references to TYI-NO-HANG I can find in my archive, which I
believe goes all the way back, is contained in the following note
from Will Clinger, who quotes from an earlier note from Kent Pitman:

>KMP:
>    Also on p30, it seems to me that the notion of CHAR-READY? is not a
>    useful one.  It's subject to timing errors in multi-processed systems
>    and/or systems which allow asynchronous interrupts. The Lisp Machine's
>    TYI-NO-HANG paradigm is much better, since it has a more test-and-set
>    feel to it and is more easy to use reliably. I suggest that CHAR-READY?
>    should be flushed and replaced by a READ-CHAR? which returns either a
>    character if one is ready, or NIL otherwise.  This gets you out of the
>    bind with rubbing out stuff that CHAR-READY? has noticed, which is really
>    an awful crock. I believe that TYI-NO-HANG will interact satisfactorily
>    with Lispm-style rubout handlers.
>
>To some extent I agree with this, but I don't think READ-CHAR? by itself
>is any better for multi-processing than CHAR-READY?.
>
>Peace, Will

I am in favor of the change, and I like Jonathan's suggestion to use the
name "read-char-if-ready".

Kent