Hello, I could not find a solution for the following problem. When I start a McClim application from slime REPL it uses 100% of cpu. I have done what is suggested in the McCLIM instalation tips. I tried to put (mp::startup-idle-and-top-level-loops) in my init.lisp file, i tried to use (setq slime-multiprocessing t) in my .emacs without success. I think the problem is on the slime side. When I start lisp in a xterm there is no problem. Finally I tried to make a cmucl image with the :init-function argument set to mp::startup-idle-and-top-level-loops. Agains it works fine when used from a xterm but does not when used from slime.
I use latest (yesterday) cvs slime, latest McCLIM and cmucl 19a (pre) on linux FC2.
Any suggestion ?
Thanks.
Thibault Langlois
Thibault Langlois tl@di.fc.ul.pt writes:
I could not find a solution for the following problem. When I start a McClim application from slime REPL it uses 100% of cpu.
Does it work right if you start it outside SLIME? And when it's chewing CPU what does (mp:all-threads) return?
I'm running SLIME + CVS McCLIM + CMU 19a-pre3 here and it works fine without chewing CPU. I have (setq slime-multiprocessing t) which causes (mp::startup-idle-and-toplevel-loops) to be called during startup.
mp::startup-idle-and-toplevel-loops is a really horrible function in that it never returns. Please try without calling that function directly, just setting slime-multiprocessing.
Also, to make SLIME does the right thing with threads in McCLIM you might want to put this in your ~/.swank.lisp:
;; Use SLIME for all threads. #+CLIM-MP (progn (setq *debugger-hook* #'swank:swank-debugger-hook) (setq swank:*globally-redirect-io* t) (setq swank:*communication-style* :spawn))
Luke Gorrie <luke <at> bluetail.com> writes:
Thibault Langlois <tl <at> di.fc.ul.pt> writes:
I could not find a solution for the following problem. When I start a McClim application from slime REPL it uses 100% of cpu.
Does it work right if you start it outside SLIME?
Yes.
And when it's chewing CPU what does (mp:all-threads) return?
In the inferior lisp buffer: * mp::*all-processes*
(#<Process #<CLIM-CLX::CLX-PORT :HOST "" :DISPLAY-ID 0 {5875EC3D}>'s event process. {589C6FE5}> #<Process Top Level Loop {585E67CD}> #<Process Idle Loop {58006BC5}>) *
Also, to make SLIME does the right thing with threads in McCLIM you might want to put this in your ~/.swank.lisp:
;; Use SLIME for all threads. #+CLIM-MP (progn (setq *debugger-hook* #'swank:swank-debugger-hook) (setq swank:*globally-redirect-io* t) (setq swank:*communication-style* :spawn))
This really solved the problem ! THANK YOU !
Thibault