19 #include <QtConcurrentMap>
23 static void getFeaturesForProvider(
const QPair< QgsVectorDataProvider *, QgsFeatureRequest > &pair )
35 constexpr
int JOBS_TO_RUN = 100;
36 QList< QPair< QgsVectorDataProvider *, QgsFeatureRequest > > jobs;
37 jobs.reserve( JOBS_TO_RUN );
38 for (
int i = 0; i < JOBS_TO_RUN; ++i )
40 jobs.append( qMakePair( provider, request ) );
45 QtConcurrent::blockingMap( jobs, getFeaturesForProvider );