summaryrefslogtreecommitdiff
path: root/indra/llcommon/llqueuedthread.cpp
diff options
context:
space:
mode:
authorJonathan "Geenz" Goodman <geenz@lindenlab.com>2026-10-13 14:30:21 -0400
committerGitHub <noreply@github.com>2026-10-13 14:30:21 -0400
commit8ba5d1a8adc47c21b23d9482e72de9517f9a98fc (patch)
treef97d67c8ee574c6ebaac8d0d8ba120d041dca051 /indra/llcommon/llqueuedthread.cpp
parent18648fc51e2a0c750182d8aa3814ed5b6bf8445e (diff)
parentefc7d2d7bb542ac905cb7ebd82ee329523f95608 (diff)
Merge pull request #6193 from secondlife/release/26.4
Release/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()
{