title: QtConcurrent::run => QWaitCondition: Destroyed while threads are still waiting
body: <p>I have the message &quot;QWaitCondition: Destroyed while threads are still waiting&quot; following the launch of <em>N</em> threads in a loop, and waiting for each in another loop.</p>
  <p>Here is the code :</p>
  <pre><code>int nb_threads = QThread::idealThreadCount();
  QFuture&lt;void&gt; futures[nb_threads];
  bool shared_boolean;
  // launch threads
  for(int i = 0;i&lt;nb_threads;++i){
      futures[i] = QtConcurrent::run(this,gpMainLoopMT,&amp;shared_boolean,&amp;next_pop_size,next_population);
  }
  
  // wait for threads to finish
  for(int i = 0;i&lt;nb_threads;++i){
      futures[i].waitForFinished();
  }
  </code></pre>
  <p>I just can't figure out why this is happening, while I am waiting for each thread.</p>