summaryrefslogtreecommitdiff
path: root/indra/llcommon/workqueue.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-04-07 20:28:42 -0400
committerGitHub <noreply@github.com>2026-04-07 20:28:42 -0400
commitf4bc7652f8ec4dac7c41e40287615c56ac1cec10 (patch)
tree08bbbeed17d08f1d92340dcffb71729e89988840 /indra/llcommon/workqueue.cpp
parentab5b121a5f13147452050adfaff58a1a8bd25d25 (diff)
parent46412a6bfcf232790b9a57931d3efafcbf758511 (diff)
Merge pull request #5624 from secondlife/geenz/velopack-26.2
Velopack -> 2026.02
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
-rw-r--r--indra/llcommon/workqueue.cpp18
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp
index 67c23358ed..fbd92d089e 100644
--- a/indra/llcommon/workqueue.cpp
+++ b/indra/llcommon/workqueue.cpp
@@ -38,7 +38,8 @@ LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown)
{
// Register for "LLApp" events so we can implicitly close() on viewer shutdown
std::string listener_name = "WorkQueue:" + getKey();
- LLEventPumps::instance().obtain("LLApp").listen(
+ LLEventPumps* pump = LLEventPumps::getInstance();
+ pump->obtain("LLApp").listen(
listener_name,
[this](const LLSD& stat)
{
@@ -54,14 +55,25 @@ LL::WorkQueueBase::WorkQueueBase(const std::string& name, bool auto_shutdown)
// Store the listener name so we can unregister in the destructor
mListenerName = listener_name;
+ mPumpHandle = pump->getHandle();
}
}
LL::WorkQueueBase::~WorkQueueBase()
{
- if (!mListenerName.empty() && !LLEventPumps::wasDeleted())
+ if (!mListenerName.empty() && !mPumpHandle.isDead())
{
- LLEventPumps::instance().obtain("LLApp").stopListening(mListenerName);
+ // Due to shutdown order issues, use handle, not a singleton
+ // and ignore fiber issue.
+ try
+ {
+ LLEventPumps* pump = mPumpHandle.get();
+ pump->obtain("LLApp").stopListening(mListenerName);
+ }
+ catch (const boost::fibers::lock_error&)
+ {
+ // Likely mutex is down, ignore
+ }
}
}