QtConcurrent-simple-usage

From Qt Wiki
Revision as of 17:18, 14 January 2015 by Maintenance script (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Hello,

This code focuses on the following problem:
We have a QList<Params>
We need to run some time consuming function for each Params set on the list.

The single core solution:

Let’s use QtConcurrent to scale easily over the cores!

Using it that way, we are sure that none of the cores is bored during our processing!

To make sure that our code always compiles, even when QtConcurrent is not supported, we may write something like this:

Categories: