<div dir="ltr">Hi Jonathan,<div><br></div><div class="gmail_extra"><div class="gmail_quote">On Mon, Feb 4, 2013 at 3:28 PM, Jonathan Fischer Friberg <span dir="ltr"><<a href="mailto:odyssomay@gmail.com" target="_blank">odyssomay@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi,<br><br>It seems that abcl is currently running on the awt thread. As when I get an error, it says something along the lines <br>
<br>"#<THREAD "AWT-EventQueue-0" {3C6B5}>"<br></div></blockquote><div><br></div><div style>As Alessio said, ABCL runs in the caller's thread.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">
This has some nasty side effects, namely:<br><br>1. eval blocks the ui (until the eval has finished)<br>2. On error, the version 1.1.0 locks down the ui completely. That is, the ui locks and doesn't come back.<br><br>
</div></blockquote><div><br></div><div style>That's probably because your System.in stream is bound to streams which are listening for input. The thread then only returns after ABCL has read input to know what action its user wants to take. Basically, you want to install handlers which present UI widgets to select such actions.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">
So it would be nice if I could run abcl on it's own separate thread. Is such a thing possible?<br></div></blockquote><div><br></div><div style>Absolutely, however ...</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">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.<span class="HOEnZb"><font color="#888888"><br>
</font></span></div></blockquote><div><br></div><div style>... sometimes you want to take special precautions: while running its initialization, ABCL also initializes its dynamic environment. This environment is bound to the executing thread. Every time you create a new thread and start running Lisp code on it, you'll be given a "clean" dynamic environment. If that's ok with you, you can run as many threads on ABCL as you want. However, dynamic environments are always bound to a specific thread. There's no way to make an environment "jump from thread to thread" when you create new threads in Lisp code.</div>
<div style><br></div><div style>Hmm. I hope that didn't confuse things for you.</div><div style><br></div><div style>Bye,</div><div style><br></div><div style>Erik.</div></div></div></div>