From my understanding QtConcurrent::blockingMappedReduced
returns the final results, whereas QtConcurrent::MappedReduced
returns a QFuture
object, but in this example http://doc.qt.io/qt-5/qtconcurrent-wordcount-main-cpp.html I saw code like this:
WordCount total = QtConcurrent::mappedReduced(files, countWords, reduce);
QtConcurrent::mappedReduced
function also returns the final results. Am I missing something? If this is wrong, what is the correct way to use the results returned by QtConcurrent::mappedReduced
? And under what condition I should QtConcurrent::mappedReduced
instead of QtConcurrent::blockingMappedReduced
? Please advise.