diff options
| author | Jonathan "Geenz" Goodman <geenz@lindenlab.com> | 2026-05-19 18:51:02 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-05-19 18:51:02 -0400 |
| commit | 6d4c4c029ce43aa413266135829cd2bc00001890 (patch) | |
| tree | 209ae880aba5ac777d524bdc557ed166b466347f /indra/llcommon/workqueue.cpp | |
| parent | 5c500ccf407f0b5a0b253b98dd4bd3f33f643aba (diff) | |
| parent | 115686ca0f962da9ec5dbcdbe54a4cb6c86302bb (diff) | |
Merge pull request #5369 from secondlife/release/2026.02
Release/2026.02
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
| -rw-r--r-- | indra/llcommon/workqueue.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index 111ad4322e..fbd92d089e 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -293,12 +293,30 @@ bool LL::WorkQueue::done() bool LL::WorkQueue::post(const Work& callable) { - return mQueue.pushIfOpen(callable); + try + { + return mQueue.pushIfOpen(callable); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::post" << LL_ENDL; + return false; + } } bool LL::WorkQueue::tryPost(const Work& callable) { - return mQueue.tryPush(callable); + try + { + return mQueue.tryPush(callable); + } + catch (std::bad_alloc&) + { + LLError::LLUserWarningMsg::showOutOfMemory(); + LL_ERRS("LLCoros") << "Bad memory allocation in WorkQueue::tryPost" << LL_ENDL; + return false; + } } LL::WorkQueue::Work LL::WorkQueue::pop_() |
