howto run commonqt asynchronously
Orm Finnendahl
orm.finnendahl at selma.hfmdk-frankfurt.de
Mon Dec 28 20:19:15 UTC 2015
On Dec 28, 2015 2:32 PM, "Stas Boukarev" <stassats at gmail.com> wrote:
>
> Just use multiple threads.
Can you provide an example?
I tried using a thread and it didn't work as expected. Here is what I
tried:
CL-USER> (ql:quickload "qt-tutorial")
To load "qt-tutorial":
Load 1 ASDF system:
qt-tutorial
; Loading "qt-tutorial"
....
("qt-tutorial")
CL-USER> (defparameter *mythread* (sb-thread:make-thread #'qt-conv::main))
*MYTHREAD*
CL-USER>
So far, so good: The window opens and I can evaluate in the
repl. After closing the window, the thread finishes, but it is
impossible, to open a new window. Reevaluating (qt-conv::main)
immediately returns -1 (in contrast to it returning 0 in the first
case after window closing).
In addition, I don't know, how to access the window in the
thread. Would it be feasible to install a polling queue mechanism
(e.g. using Mailbox in sbcl) within the thread which sends to the
application and receives from the repl?
--
Orm
More information about the commonqt-devel
mailing list