Thanks Elvis, much appreciated!

On 19/01/17 7:55 PM, Elvis Stansvik wrote:
2017-01-19 1:10 GMT+01:00 Thiago Macieira <thiago.macie...@intel.com>:
On quarta-feira, 18 de janeiro de 2017 20:04:41 PST Elvis Stansvik wrote:
If you have one QThread that depends on the completion of another,
then no, I don't think there's a convenient API in Qt to express that
relationship and run the threads in sequence. You'll have to string
them together yourself, or maybe use something else like Threadweaver.
I could be wrong of course
You can always chain-connect one thread's finished() signal to the other's
start() slot.
Yes sorry, should have been more explicit, that's what I meant with
"string them together".

Frank, another threading approach in Qt which we haven't mentioned yet
is QtConcurrent. I use that myself in an application where I had to
load a series of large tomographic volumes using VTK (so blocking
I/O). It might not be a good fit for your use case, but thought I
should mention it for brevity.

Elvis

But that's unnecessary overhead: stopping and starting threads. You should do
like Elvis says and just reuse the thread.

--
Thiago Macieira - thiago.macieira (AT) intel.com
   Software Architect - Intel Open Source Technology Center

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest
_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

_______________________________________________
Interest mailing list
Interest@qt-project.org
http://lists.qt-project.org/mailman/listinfo/interest

Reply via email to