- more thread cleanup

This commit is contained in:
Mark Vejvoda
2011-03-25 22:50:30 +00:00
parent 53f57dad13
commit 884b46da60
3 changed files with 27 additions and 5 deletions

View File

@@ -2119,8 +2119,9 @@ int glestMain(int argc, char** argv) {
if(preCacheThread.get() != NULL) {
time_t elapsed = time(NULL);
for(;preCacheThread->shutdownAndWait() == false &&
difftime(time(NULL),elapsed) <= 5;) {
preCacheThread->signalQuit();
for(;preCacheThread->canShutdown(false) == false &&
difftime(time(NULL),elapsed) <= 15;) {
sleep(50);
}
}