diff options
author | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-09 19:43:11 +0200 |
---|---|---|
committer | Vadim Savchuk <vsavchuk@productengine.com> | 2010-03-09 19:43:11 +0200 |
commit | cbbddc8eaa694d7a8e37d188350fcb6ca88124fe (patch) | |
tree | 4f583ff144e637560c88069ef79d199d9b449686 /indra/newview/llappviewer.cpp | |
parent | b513811c7be5e4d71dfc2c2a8d07e738c990293a (diff) | |
parent | caa1435ae0afa0e4ac2fe42fc8dc67dd93cdb524 (diff) |
Merge from default branch
--HG--
branch : product-engine
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 8b3f3aa28e..bdfe0d9142 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -703,9 +703,9 @@ bool LLAppViewer::init() settings_map["account"] = &gSavedPerAccountSettings; LLUI::initClass(settings_map, - LLUIImageList::getInstance(), - ui_audio_callback, - &LLUI::sGLScaleFactor); + LLUIImageList::getInstance(), + ui_audio_callback, + &LLUI::sGLScaleFactor); // Setup paths and LLTrans after LLUI::initClass has been called LLUI::setupPaths(); @@ -1516,7 +1516,7 @@ bool LLAppViewer::cleanup() LLAvatarIconIDCache::getInstance()->save(); llinfos << "Shutting down Threads" << llendflush; - + // Let threads finish LLTimer idleTimer; idleTimer.reset(); @@ -1530,19 +1530,26 @@ bool LLAppViewer::cleanup() pending += LLVFSThread::updateClass(0); pending += LLLFSThread::updateClass(0); F64 idle_time = idleTimer.getElapsedTimeF64(); - if (!pending || idle_time >= max_idle_time) + if(!pending) + { + break ; //done + } + else if(idle_time >= max_idle_time) { llwarns << "Quitting with pending background tasks." << llendl; break; } } - + // Delete workers first // shotdown all worker threads before deleting them in case of co-dependencies sTextureCache->shutdown(); sTextureFetch->shutdown(); sImageDecodeThread->shutdown(); + sTextureFetch->shutDownTextureCacheThread() ; + sTextureFetch->shutDownImageDecodeThread() ; + delete sTextureCache; sTextureCache = NULL; delete sTextureFetch; |