summaryrefslogtreecommitdiff
path: root/indra/llcommon/lleventcoro.cpp
diff options
context:
space:
mode:
authorRider Linden <rider@lindenlab.com>2016-04-22 12:07:27 -0700
committerRider Linden <rider@lindenlab.com>2016-04-22 12:07:27 -0700
commit899489ae0a4bc4eb187e7813e338b937384a1866 (patch)
treee83b388e1f35d1fe53701203131cd94ac5216ec2 /indra/llcommon/lleventcoro.cpp
parent8f4be8bb869e3cde034607cbe0cb8272005f08b8 (diff)
MAINT-6336: Centralize waiting on event pump with a timeout. Shorten the lifespan of a timeout event pump lifespan to be no longer than necessary. Change all references to the LLEventTimer to instead uses the centralized version.
Diffstat (limited to 'indra/llcommon/lleventcoro.cpp')
-rwxr-xr-xindra/llcommon/lleventcoro.cpp9
1 files changed, 9 insertions, 0 deletions
diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp
index 578a2b62c8..44291eb711 100755
--- a/indra/llcommon/lleventcoro.cpp
+++ b/indra/llcommon/lleventcoro.cpp
@@ -229,6 +229,15 @@ LLSD llcoro::postAndSuspend(const LLSD& event, const LLEventPumpOrPumpName& requ
return value;
}
+LLSD llcoro::suspendUntilEventOnWithTimeout(const LLEventPumpOrPumpName& pump, F32 timeoutin, const LLSD &timeoutResult)
+{
+ LLEventTimeout timeoutPump(pump);
+
+ timeoutPump.eventAfter(timeoutin, timeoutResult);
+ return llcoro::suspendUntilEventOn(timeoutPump);
+
+}
+
namespace
{