diff options
author | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-05 17:56:19 +0000 |
---|---|---|
committer | Tofu Linden <tofu.linden@lindenlab.com> | 2010-03-05 17:56:19 +0000 |
commit | df50590145a835531a9539a96e8349f910161f53 (patch) | |
tree | 9fa9912f3f815d01401d7095ef28f2f8d7f0d7b7 /indra/newview/llappviewer.cpp | |
parent | f1a4dc710d3978a96bb05482643df0960f6e8fd4 (diff) | |
parent | b9a96aaeb3aaf4a5e30364ddcba5af40cceb3e83 (diff) |
merge from viewer-2-0
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r-- | indra/newview/llappviewer.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp index 6d4c90c2b9..ccd58e26fe 100644 --- a/indra/newview/llappviewer.cpp +++ b/indra/newview/llappviewer.cpp @@ -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; |