summaryrefslogtreecommitdiff
path: root/indra/llimage
diff options
context:
space:
mode:
authorRye Mutt <rye@alchemyviewer.org>2023-05-05 17:20:48 -0400
committerRye Mutt <rye@alchemyviewer.org>2023-05-05 17:20:48 -0400
commit6954aafb5d37060cbbe72d311333504a80c54964 (patch)
tree70421cc63e5e4b5fb3c785eb100199bbd3c42eb3 /indra/llimage
parent5ce70325ce207e31317346f1ed1405a21259e6dd (diff)
Fix uncaught LLThreadSafeQueueInterrupt during ImageWorker threadpool shutdown
Diffstat (limited to 'indra/llimage')
-rw-r--r--indra/llimage/llimageworker.cpp23
1 files changed, 15 insertions, 8 deletions
diff --git a/indra/llimage/llimageworker.cpp b/indra/llimage/llimageworker.cpp
index 0093958e6d..9358a0ae2c 100644
--- a/indra/llimage/llimageworker.cpp
+++ b/indra/llimage/llimageworker.cpp
@@ -92,14 +92,21 @@ LLImageDecodeThread::handle_t LLImageDecodeThread::decodeImage(
{
LL_PROFILE_ZONE_SCOPED_CATEGORY_TEXTURE;
- // Instantiate the ImageRequest right in the lambda, why not?
- mThreadPool->getQueue().post(
- [req = ImageRequest(image, discard, needs_aux, responder)]
- () mutable
- {
- auto done = req.processRequest();
- req.finishRequest(done);
- });
+ try
+ {
+ // Instantiate the ImageRequest right in the lambda, why not?
+ mThreadPool->getQueue().post(
+ [req = ImageRequest(image, discard, needs_aux, responder)]
+ () mutable
+ {
+ auto done = req.processRequest();
+ req.finishRequest(done);
+ });
+ }
+ catch (const LLThreadSafeQueueInterrupt&)
+ {
+ LL_DEBUGS() << "Tried to start decoding on shutdown" << LL_ENDL;
+ }
// It's important to our consumer (LLTextureFetchWorker) that we return a
// nonzero handle. It is NOT important that the nonzero handle be unique: