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:
Each of the threads is an instance of different object. I guess that QWaitCondition is useless since several producers are used.Qt Code:
Thread1 prod1; Thread2 prod2; .; Thread3 prod3; Thread cons; prod1.start(); prod2.start(); .; prod3.start(); prod1.wait(); prod2.wait(); .; prod3.wait(); cons.start(); cons.wait();To copy to clipboard, switch view to plain text mode
Thk’s Vojta.
Bookmarks