Hi there,

I am experimenting with the QtConcurrent framework in order to launch multiple, long running threads that compute some scientific stuff.
I use a blocking QtConcurrent::blockingMap call with a member function like so:

Qt Code:
  1. void Experimenter::runExperiments()
  2. {
  3. QtConcurrent::blockingMap(cases, [this] (ExperimentConfig& ex) { processCase(ex); });
  4. }
  5.  
  6. void Experimenter::processCase(ExperimentConfig& ex)
  7. {
  8. // compute many things
  9. }
To copy to clipboard, switch view to plain text mode 

This works fine as it launches some 20 threads on my machine, but only one of these threads is actively working. I'm observing the threads in htop and I can see that only one core and one process is peaked to near 100%. The machine has plenty of memory available and barely 10% of it is used. Any ideas as to how I can make this more efficient?