No, it's not about a performance issue.
I was just not satisfied with leaving this function running until the end, since I already had my result and the rest will not bring me anything more.
If I need to write it in a simple 'foreach' loop, I would write something like
And I wanted to keep the same spirit with 'mappedReduced' (as long as this doesn't violate any "thread-rules" and without having to "hack" QtConcurrent).
But yes, in fact I'm blocking my application untile I receive the results. My other methods that need to perform an action on all the items use 'blockingMapped', 'blockingMappedReduced' and 'blockingFiltered'. It's for a library that I am writing. And the applications that will use it are procedurale, not a GUI (or, maybe later...who knows?). But they may have to handle very long lists, and the 'compute' function are heavy. So QtConcurrent is a welcome help.
I think I'll keep the first solution, the most elegant one in my eyes, if I don't get any warning.