<div dir="ltr">I implemented SLIME REPL integration for CommonQt some time ago,<div>don't know whether it still works in recent CommonQt/SLIME versions, see</div><div><a href="https://github.com/commonqt/commonqt/blob/master/repl-integration.lisp">https://github.com/commonqt/commonqt/blob/master/repl-integration.lisp</a><br></div><div>It utilizes SLIME REPL eval hooks to make SLIME REPL evaluate</div><div>expressions in the context of GUI thread, which is much safer</div><div>than just starting separate thread and hoping that doing stuff in</div><div>the main thread will not cause some kind of race condition.</div><div>When it worked it was enough to do</div><div>(ql:quickload 'qt-repl)<br></div><div>(qt-repl:start-gui-thread)<br></div><div>And after that you could do most GUI stuff right from REPL</div><div>without worrying that something will break.</div><div>In my not-up-to-date CommonQt fork it still works, at least when using</div><div>CCL: <a href="https://github.com/ivan4th/commonqt">https://github.com/ivan4th/commonqt</a></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Dec 29, 2015 at 1:11 AM, Stas Boukarev <span dir="ltr"><<a href="mailto:stassats@gmail.com" target="_blank">stassats@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Tue, Dec 29, 2015 at 1:08 AM, Orm Finnendahl<br>
<<a href="mailto:orm.finnendahl@selma.hfmdk-frankfurt.de">orm.finnendahl@selma.hfmdk-frankfurt.de</a>> wrote:<br>
<span class="">> Am Dienstag, den 29. Dezember 2015 um 00:54:09 Uhr (+0300) schrieb Stas Boukarev:<br>
>> All the GUI stuff has to be done from the same thread (and on some<br>
>> OSes it has to be the main thread).<br>
>> To communicate with Qt from a different thread use Qt signals, they<br>
>> are thread-safe.<br>
><br>
</span>> Thanks, that helps! Do you know, why it is impossible to restart the<br>
> tutorial example after the thread has finished? Restarting in the<br>
> main thread after closing the window is no problem. The only way to<br>
> restart the tutorial after running it within sb-threads:make-thread is<br>
> to restart sbcl.<br>
You can restart it in that thread, but only in that thread. The event loop<br>
cannot be restarted, but as long as it's running you can execute and close<br>
as many windows as you'd like.<br>
<div class="HOEnZb"><div class="h5"><br>
--<br>
With best regards, Stas.<br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Ivan Shvedunov <<a href="mailto:ivan4th@gmail.com" target="_blank">ivan4th@gmail.com</a>><br>;; My GPG fingerprint is: 2E61 0748 8E12 BB1A 5AB9 F7D0 613E C0F8 0BC5 2807</div>
</div>