src/corelib/concurrent/qtconcurrentmap.cpp
changeset 37 758a864f9613
parent 33 3e2da88830cd
equal deleted inserted replaced
36:ef0373b55136 37:758a864f9613
   159 
   159 
   160     The reduce function will be called once for each result returned by the map
   160     The reduce function will be called once for each result returned by the map
   161     function, and should merge the \e{intermediate} into the \e{result}
   161     function, and should merge the \e{intermediate} into the \e{result}
   162     variable.  QtConcurrent::mappedReduced() guarantees that only one thread
   162     variable.  QtConcurrent::mappedReduced() guarantees that only one thread
   163     will call reduce at a time, so using a mutex to lock the result variable
   163     will call reduce at a time, so using a mutex to lock the result variable
   164     is not neccesary. The QtConcurrent::ReduceOptions enum provides a way to
   164     is not necessary. The QtConcurrent::ReduceOptions enum provides a way to
   165     control the order in which the reduction is done. If
   165     control the order in which the reduction is done. If
   166     QtConcurrent::UnorderedReduce is used (the default), the order is
   166     QtConcurrent::UnorderedReduce is used (the default), the order is
   167     undefined, while QtConcurrent::OrderedReduce ensures that the reduction
   167     undefined, while QtConcurrent::OrderedReduce ensures that the reduction
   168     is done in the order of the original sequence.
   168     is done in the order of the original sequence.
   169 
   169