Example #1
0
 Impl( const Futures& futures )
 {
     for( const auto& future: futures )
     {
         const std::string& name = future.getName();
         if( hasFuture( name ))
             throwError( name );
         addFuture( name, future );
     }
 }
//! [0]
void someFunction()
{
    QFutureSynchronizer<void> synchronizer;

    ...

    synchronizer.addFuture(QtConcurrent::run(anotherFunction));
    synchronizer.addFuture(QtConcurrent::map(list, mapFunction));

    return; // QFutureSynchronizer waits for all futures to finish
}
Example #3
0
 Impl( const Futures& futures )
 {
     for( const auto& future: futures )
         addFuture( future.getName(), future );
 }