Hi,
I’ve got maybe simple question but I didn’t find appropriate answer jet. Can someone help me if there is an elegant way how to wake-up one thread (“cons”) when several threads (“prod”) are finished. This code doesn’t work well:
Qt Code:
  1. Thread1 prod1;
  2. Thread2 prod2;
  3. .;
  4. Thread3 prod3;
  5. Thread cons;
  6.  
  7. prod1.start();
  8. prod2.start();
  9. .;
  10. prod3.start();
  11. prod1.wait();
  12. prod2.wait();
  13. .;
  14. prod3.wait();
  15. cons.start();
  16. cons.wait();
To copy to clipboard, switch view to plain text mode 
Each of the threads is an instance of different object. I guess that QWaitCondition is useless since several producers are used.
Thk’s Vojta.