diff options
| author | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-03-20 17:44:28 -0400 |
|---|---|---|
| committer | Jonathan "Geenz" Goodman <geenz@geenzo.com> | 2026-03-20 17:44:28 -0400 |
| commit | e3592e502e0540e72c53c152ccd7b890fd231d06 (patch) | |
| tree | cd768ccb200002c00193fd7b9b55815de239a683 /indra/llcommon/workqueue.cpp | |
| parent | bbce47f8dcfbaa2352e100af0151e53452c5e339 (diff) | |
| parent | ebe25a76df47b1d8c861b3375d4c785731649ec9 (diff) | |
Merge branch 'release/26.1.1' of https://github.com/secondlife/viewer into release/26.1.1
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
| -rw-r--r-- | indra/llcommon/workqueue.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index 0407d6c3e9..111ad4322e 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 + } } } |
