[EMAIL PROTECTED] wrote: > >>>>> "Kick" == Kick Damien-DKICK1 <[EMAIL PROTECTED]> writes:
> Kick> Why does it seem to get stuck? > We are overlooking the fact that READ-CHAR does not operate directly > on the descriptor, but on a *buffered* FD-STREAM. Here is how I > interpret your experiment: <nod> I don't know why I was assuming the READ-CHAR was unbuffered. > 1. The toplevel poll/select invokes your handler. > 2. READ-SEQUENCE (or whatever STREAM function you're using) decides > to fill up the buffer, resulting in a read() system call that > depletes the descriptor of all available data. > 3. Subsequent calls to READ-CHAR return characters already in the > buffer > 4. Subsequent calls to SYS:WAIT-UNTIL-FD-USABLE fail because there > is no new data at the descriptor level And as soon as the remote end closes, the descriptor remains readable (for EOF, I suppose) and so the handler gets called again and again, "unsticking it." I get what is happening now. Thanks for the help. > Kick> BTW, both SERVE-EVENTS and WAIT-UNTIL-FD-USABLE have a timeout > Kick> that is of a granualarity of seconds? > CL-USER> (time (sys:wait-until-fd-usable 0 :input 1/5)) > ; Evaluation took: > ; 0.22 seconds of real time Ah... Thanks.
