summaryrefslogtreecommitdiff
path: root/indra/newview/llappviewer.cpp
diff options
context:
space:
mode:
authorTofu Linden <tofu.linden@lindenlab.com>2010-03-05 20:41:11 +0000
committerTofu Linden <tofu.linden@lindenlab.com>2010-03-05 20:41:11 +0000
commited8e6f65fcc6065101a5decb26be31a4bfdefe5d (patch)
tree5d414bb2fcb74cdbc989e8285570258d0fa840e4 /indra/newview/llappviewer.cpp
parentb43441d9024db6e2ff46e53aace14f1fb6c1bbe6 (diff)
parent32aa06139e6fb5f2e84d3e657dfbe8961170a804 (diff)
viewer2 merge.
Diffstat (limited to 'indra/newview/llappviewer.cpp')
-rw-r--r--indra/newview/llappviewer.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/indra/newview/llappviewer.cpp b/indra/newview/llappviewer.cpp
index dfbf05db52..b1db7bf481 100644
--- a/indra/newview/llappviewer.cpp
+++ b/indra/newview/llappviewer.cpp
@@ -1533,7 +1533,7 @@ bool LLAppViewer::cleanup()
LLAvatarIconIDCache::getInstance()->save();
llinfos << "Shutting down Threads" << llendflush;
-
+
// Let threads finish
LLTimer idleTimer;
idleTimer.reset();
@@ -1547,19 +1547,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;