[slime-devel] Re: cmucl multithread problem
Luke Gorrie
luke at bluetail.com
Sat Dec 13 01:01:42 UTC 2003
William Conrad Halliburton <will at licentiae.com> writes:
> (defun slime-maybe-start-lisp ()
> "Start an inferior lisp unless one is already running."
> (unless (get-buffer-process (get-buffer "*inferior-lisp*"))
> (call-interactively 'inferior-lisp)
> (comint-proc-query (inferior-lisp-proc)
> "(mp::startup-idle-and-top-level-loops)")
> (comint-proc-query (inferior-lisp-proc)
> (format "(load %S)\n" (concat slime-path slime-backend)))))
We also have a ~/.swank.lisp file where you can add custom startup
like this idle-loop thread.
> (defun slime-start-swank-server ()
> "Start a Swank server on the inferior lisp."
> (comint-proc-query (inferior-lisp-proc)
> (format "(mp::make-process (lambda () (swank:start-server %S))
> :name \"slime\")\n"
> (slime-swank-port-file))))
Do you know how threads interact with SERVE-EVENT in CMUCL?
SLIME-wise it's probably fairly safe if we are always talking to the
same thread. But it would get really nasty if you e.g. spawn off new
threads that inherit our *debugger-hook* and I/O streams and all end
up trying to talk to Emacs at once. We don't handle that at all.
-Luke
More information about the slime-devel
mailing list