diff options
author | Erik Kundiman <erik@megapahit.org> | 2025-07-29 07:07:29 +0800 |
---|---|---|
committer | Erik Kundiman <erik@megapahit.org> | 2025-07-29 07:07:29 +0800 |
commit | cb759bf9e0580b0c0799e33b8e7af1ea46a4c336 (patch) | |
tree | 403de432ee5431fdb5195cb21d81b1c0a01cec54 /indra/llcommon/workqueue.cpp | |
parent | 2ec9d7fa779456112f36e963d1e169a71149662a (diff) | |
parent | 288bce100d1239dd98e1d0730c905cc5cbe6ad1b (diff) |
Merge tag 'Second_Life_Release#288bce10-2025.05' into 2025.05
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
-rw-r--r-- | indra/llcommon/workqueue.cpp | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp index c8ece616b2..ea4feec58c 100644 --- a/indra/llcommon/workqueue.cpp +++ b/indra/llcommon/workqueue.cpp @@ -182,14 +182,22 @@ void LL::WorkQueueBase::callWork(const Work& work) } catch (...) { - // Stash any other kind of uncaught exception to be rethrown by main thread. - LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase " - << getKey() << LL_ENDL; - - LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); - main_queue->post( - // Bind the current exception, rethrow it in main loop. - [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + if (getKey() != "mainloop") + { + // Stash any other kind of uncaught exception to be rethrown by main thread. + LL_WARNS("LLCoros") << "Capturing and rethrowing uncaught exception in WorkQueueBase " + << getKey() << LL_ENDL; + + LL::WorkQueue::ptr_t main_queue = LL::WorkQueue::getInstance("mainloop"); + main_queue->post( + // Bind the current exception, rethrow it in main loop. + [exc = std::current_exception()]() { std::rethrow_exception(exc); }); + } + else + { + // let main loop crash + throw; + } } #endif // else LL_WINDOWS } |