Qt wiki will be updated on October 12th 2023 starting at 11:30 AM (EEST) and the maintenance will last around 2-3 hours. During the maintenance the site will be unavailable.
QtConcurrent-simple-usage
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: