summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventcoro.cpp
diff options
context:
space:
mode:
authorAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-23 22:51:27 +0200
committerAndrey Kleshchev <117672381+akleshchev@users.noreply.github.com>2026-01-24 18:42:55 +0200
commite42ec63bfd7ada1087a00ca3ccc39c95679b7fab (patch)
treee25ddc81b7704dc31ad457d7c812d39ccdc57892 /indra/llcommon/lleventcoro.cpp
parent10201dbbd36d70a6a291c4cb64c1044d99cc46a5 (diff)
#5046 Fix a long freeze when fetching inventory
Diffstat (limited to 'indra/llcommon/lleventcoro.cpp')
-rw-r--r--indra/llcommon/lleventcoro.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
index e1fc4764f6..bb2cd4fb2e 100644
--- a/indra/llcommon/lleventcoro.cpp
+++ b/indra/llcommon/lleventcoro.cpp
@@ -137,6 +137,18 @@ void llcoro::suspendUntilTimeout(float seconds)
suspendUntilEventOnWithTimeout(bogus, seconds, timedout);
}
+void llcoro::suspendUntilNextFrame()
+{
+ LLCoros::checkStop();
+ LLCoros::TempStatus st("waiting for next frame");
+
+ // Listen for the next event on the "mainloop" event pump.
+ // Once per frame we get mainloop.post(newFrame);
+ LLEventPumpOrPumpName mainloop_pump("mainloop");
+ // Wait for the next event (the event data is ignored).
+ suspendUntilEventOn(mainloop_pump);
+}
+
namespace
{