summaryrefslogtreecommitdiff
path: root/indra/llcommon/workqueue.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-06 16:05:19 +0300
committerAndrey Kleshchev <andreykproductengine@lindenlab.com>2025-08-06 16:05:19 +0300
commitce9d66cdd18c58c3b26fbebde633ae00732d7f9f (patch)
treefdbc5a913c62265f95e610819637e096f0f85339 /indra/llcommon/workqueue.cpp
parent514b658fde13bb0c0ec862b081eeebf47bace70d (diff)
parent0f68bcd46ca3f2babf94303b80e2be006e4693ae (diff)
Merge branch develop into 2025.06
# Conflicts: # indra/newview/llvoavatar.cpp
Diffstat (limited to 'indra/llcommon/workqueue.cpp')
-rw-r--r--indra/llcommon/workqueue.cpp24
1 files changed, 16 insertions, 8 deletions
diff --git a/indra/llcommon/workqueue.cpp b/indra/llcommon/workqueue.cpp
index 0eb20323ad..7efaebd569 100644
--- a/indra/llcommon/workqueue.cpp
+++ b/indra/llcommon/workqueue.cpp
@@ -210,14 +210,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
}