[armedbear-devel] Running abcl outside awt thread

Alessio Stalla alessiostalla at gmail.com
Mon Feb 4 14:39:33 UTC 2013


On Mon, Feb 4, 2013 at 3:28 PM, Jonathan Fischer Friberg
<odyssomay at gmail.com> wrote:
> Hi,
>
> It seems that abcl is currently running on the awt thread. As when I get an
> error, it says something along the lines
>
> "#<THREAD "AWT-EventQueue-0" {3C6B5}>"
>
> This has some nasty side effects, namely:
>
> 1. eval blocks the ui (until the eval has finished)
> 2. On error, the version 1.1.0 locks down the ui completely. That is, the ui
> locks and doesn't come back.
>
> So it would be nice if I could run abcl on it's own separate thread. Is such
> a thing possible?
>
> I guess in worst case I'll have to start up a separate thread in the eval
> (that is, in common lisp), which I think would do what I want. I would
> prefer to have the whole of abcl in its' own thread though.
>

Actually, ABCL runs in the caller thread, so you should not make
potentially long or blocking calls to it on the AWT thread (e.g. in
event listeners). You should use SwingWorker if you're using Swing
(see http://docs.oracle.com/javase/tutorial/uiswing/concurrency/index.html)
or the ExecutorService or other similar tools.

Alessio
-- 
Some gratuitous spam:

http://ripple-project.org Ripple, social credit system
http://villages.cc Villages.cc, Ripple-powered community economy
http://common-lisp.net/project/armedbear ABCL, Common Lisp on the JVM
http://code.google.com/p/tapulli my current open source projects
http://www.manydesigns.com/ ManyDesigns Portofino, open source
model-driven Java web application framework




More information about the armedbear-devel mailing list