diff options
author | Rider Linden <rider@lindenlab.com> | 2016-04-22 12:07:27 -0700 |
---|---|---|
committer | Rider Linden <rider@lindenlab.com> | 2016-04-22 12:07:27 -0700 |
commit | 899489ae0a4bc4eb187e7813e338b937384a1866 (patch) | |
tree | e83b388e1f35d1fe53701203131cd94ac5216ec2 /indra/llcommon/lleventcoro.cpp | |
parent | 8f4be8bb869e3cde034607cbe0cb8272005f08b8 (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-x | indra/llcommon/lleventcoro.cpp | 9 |
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 { |