[Qt-interest] Main thread sleep or stop problem
arjun
me_arjun2008 at rediffmail.com
Mon Feb 22 04:38:04 CET 2010
Hi All,
I am working on multithread application. I want to stop or sleep main until all other thread complete there work.
How can achieve this. please help me.
currently i am doing this using following while loop.
here i am checking for each thread Object is finish in main thread. But it consume time for doing this.
while(threadCount > 0)
{
for(int i = inCount;i< noOfThread;i++)
{
if(threadObj[i].isFinished())
{
threadCount--;
if(threadCount == 0)
{
break;
}
}
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100222/c3d5c8c7/attachment.html
More information about the Qt-interest-old
mailing list