bugfix for pure virtual error on garbage collector thread

This commit is contained in:
Mark Vejvoda 2013-06-18 22:26:12 +00:00
parent d13242287c
commit eec6d4f59c
1 changed files with 5 additions and 1 deletions

View File

@ -197,7 +197,11 @@ void Thread::queueAutoCleanThread() {
//printf("In Thread::shutdownThreads Line: %d\n",__LINE__);
cleanupThread.reset(new ThreadGarbageCollector());
cleanupThread->start();
sleep(0);
for(time_t elapsed = time(NULL);
cleanupThread->getRunningStatus() == false &&
difftime(time(NULL),elapsed) < 6;) {
sleep(5);
}
}
cleanupThread->addThread(this);
//printf("In Thread::shutdownThreads Line: %d\n",__LINE__);