summaryrefslogtreecommitdiff
path: root/indra/llcommon/llqueuedthread.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2026-09-01 18:35:23 +0800
committerErik Kundiman <erik@megapahit.org>2026-09-04 21:58:53 +0800
commit00bb3bb6f07660bd914d29a1389342bb3060d254 (patch)
tree431f574922494d2201718f13085f17bc6bd7fb42 /indra/llcommon/llqueuedthread.cpp
parenta8636720129952c10cf49ab80da21bf8b340b96c (diff)
parent4ef9f8f14b35ed388c294d53767a0dca0e890924 (diff)
Merge remote-tracking branch 'secondlife/release/26.4' into 26.4
Diffstat (limited to 'indra/llcommon/llqueuedthread.cpp')
-rw-r--r--indra/llcommon/llqueuedthread.cpp27
1 files changed, 27 insertions, 0 deletions
diff --git a/indra/llcommon/llqueuedthread.cpp b/indra/llcommon/llqueuedthread.cpp
index efeeb1340e..8c740956b3 100644
--- a/indra/llcommon/llqueuedthread.cpp
+++ b/indra/llcommon/llqueuedthread.cpp
@@ -222,6 +222,33 @@ void LLQueuedThread::waitOnPending()
return;
}
+void LLQueuedThread::waitOnPending(F32 max_time_sec)
+{
+ LLTimer wait_timer;
+ wait_timer.reset();
+ while (1)
+ {
+ update(0);
+
+ if (mIdleThread)
+ {
+ break;
+ }
+
+ if (wait_timer.getElapsedTimeF64() >= max_time_sec)
+ {
+ LL_WARNS() << "waitOnPending() timed out after " << max_time_sec
+ << " seconds in thread: " << mName << LL_ENDL;
+ break;
+ }
+
+ if (mThreaded)
+ {
+ yield();
+ }
+ }
+}
+
// MAIN thread
void LLQueuedThread::printQueueStats()
{