Compilation fixes for Android+boost

This commit is contained in:
Xawotihs
2011-11-16 20:49:26 +00:00
parent ee700623d5
commit 8a1606a3c6
2 changed files with 10 additions and 4 deletions

View File

@@ -452,7 +452,8 @@ TestSuite::~TestSuite()
mProcessing = false;
while(mWorkerThread.size())
{
mWorkerThread.back().join();
mWorkerThread.back()->join();
SAFE_DELETE(mWorkerThread.back());
mWorkerThread.pop_back();
}
@@ -545,13 +546,18 @@ int TestSuite::loadNext()
if(!mProcessing)
{ // "I don't like to wait" mode
mProcessing = true;
mWorkerThread.clear();
while(mWorkerThread.size())
{
mWorkerThread.back()->join();
SAFE_DELETE(mWorkerThread.back());
mWorkerThread.pop_back();
}
size_t thread_count = 1;
#ifdef QT_CONFIG
thread_count = QThread::idealThreadCount();
#endif
for(size_t i = 0; i < (thread_count-1); i++)
mWorkerThread.push_back(boost::thread(ThreadProc, this));
mWorkerThread.push_back(new boost::thread(ThreadProc, this));
}
cleanup();