[commonqt-devel] What is the recommended way to do background jobs in CommonQt?

Hi! In my application, I need to download a big picture, when it is done, open a complex widget to show the picture (moving/zooming etc). I have options like threads in CL, QThread, QtConcurrent. What is the recommended way? Or maybe some of them just don't work? - Rujia

It looks like using bordeaux-threads is the *only* option that works for me :( I use bordeaux-threads: make-thread to make a thread, download the picture in that thread, and after it's downloaded, emit a signal. I think the slot function is still executed in the main thread, not the new thread created by bordeaux-threads:make-thread, am I right? At least I didn't observe anything suspicious. Correct me if this is not a recommended way. On Tue, Sep 24, 2013 at 6:37 PM, Rujia Liu <rujia.liu@gmail.com> wrote:
Hi!
In my application, I need to download a big picture, when it is done, open a complex widget to show the picture (moving/zooming etc). I have options like threads in CL, QThread, QtConcurrent. What is the recommended way? Or maybe some of them just don't work?
- Rujia

Rujia Liu <rujia.liu@gmail.com> writes:
It looks like using bordeaux-threads is the *only* option that works for me :(
I use bordeaux-threads: make-thread to make a thread, download the picture in that thread, and after it's downloaded, emit a signal. I think the slot function is still executed in the main thread, not the new thread created by bordeaux-threads:make-thread, am I right? At least I didn't observe anything suspicious. Correct me if this is not a recommended way. Yes, using lisp threads is the best way.
-- With best regards, Stas.
participants (2)
-
Rujia Liu
-
Stas Boukarev