diff options
| author | Xiaohong Bao <bao@lindenlab.com> | 2010-03-05 09:15:18 -0700 |
|---|---|---|
| committer | Xiaohong Bao <bao@lindenlab.com> | 2010-03-05 09:15:18 -0700 |
| commit | d33b6a18872a652808afe3aa9ae40de6adaa3004 (patch) | |
| tree | 6ea0bd6d39110f8cbf8a71c0806c5ca7dfa7f9fc /indra/newview/llappviewer.cpp | |
| parent | f7ad793e54a0dc4bec53e6ac56b15bb8115620a1 (diff) | |
| parent | b0d4919fd453fea9afc1cc0745140e83992997b6 (diff) | |
Automated merge with ssh://hg.lindenlab.com/viewer/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; |
