Skip to content
Snippets Groups Projects
Commit b84f8f33 authored by Rye Mutt's avatar Rye Mutt :bread:
Browse files

Fix shutdown crash exploding image threadpools on shutdown

parent eef79abf
No related branches found
No related tags found
No related merge requests found
......@@ -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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment