[slime-devel] slime & sbcl event-loop issues

Helmut Eller heller at common-lisp.net
Sun Feb 15 10:50:31 UTC 2009


* xristos [2009-02-15 06:02+0100] writes:

[...]
> I could give up :spawn and work with :fd-handler comm style,
> if slime would let other handlers run and not block without
> configurable timeout at least. Is this feasible ? Where would
> one start looking in order to implement it ?

I'm not sure what you need.  Usually, the "initial" thread blocks in
SB-SYS:WAIT-UNTIL-FD-USABLE which calls SERVE-EVENT with both :spawn and
:fd-handler.  At least that used to be so.

With :fd-handler style, SLIME registers a fd-handler but doesn't call
SERVE-EVENTS directly.  SERVE-EVENTS is called by the initial thread
which waits for input on *standard-input* in the *inferior-lisp* buffer.
SLIME blocks when the debugger needs to waits for input, but that can
only happen after the fd-handler is called (or after an interrupt, but
let's ignore that).  If you actually need nested event-loops things get
complicated quickly, especially if interrupts are involved.

With :spawn style SLIME doesn't touch SERVE-EVENTS.

Is there a problem if you run the event-loop in your own thread?  

Helmut.





More information about the slime-devel mailing list