From 899489ae0a4bc4eb187e7813e338b937384a1866 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Fri, 22 Apr 2016 12:07:27 -0700 Subject: 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. --- indra/llcommon/lleventcoro.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'indra/llcommon/lleventcoro.h') diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index 2105faf861..19c68e1f35 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -147,6 +147,8 @@ LLSD suspendUntilEventOn(const LLEventPumpOrPumpName& pump) return postAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump); } +LLSD suspendUntilEventOnWithTimeout(const LLEventPumpOrPumpName& pump, F32 timeoutin, const LLSD &timeoutResult); + } // namespace llcoro /// return type for two-pump variant of suspendUntilEventOn() -- cgit v1.2.3 From dd2311b993d137c538ca57b4360669db6d7fbfa0 Mon Sep 17 00:00:00 2001 From: Rider Linden Date: Tue, 26 Apr 2016 11:56:25 -0700 Subject: MAINT-6336: Put the timeout upstream of the suspending pump and fire the timeout it. Also some cleanup on LLSD construction in vivox. --- indra/llcommon/lleventcoro.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/lleventcoro.h') diff --git a/indra/llcommon/lleventcoro.h b/indra/llcommon/lleventcoro.h index 19c68e1f35..87926c692d 100755 --- a/indra/llcommon/lleventcoro.h +++ b/indra/llcommon/lleventcoro.h @@ -147,7 +147,10 @@ LLSD suspendUntilEventOn(const LLEventPumpOrPumpName& pump) return postAndSuspend(LLSD(), LLEventPumpOrPumpName(), pump); } -LLSD suspendUntilEventOnWithTimeout(const LLEventPumpOrPumpName& pump, F32 timeoutin, const LLSD &timeoutResult); +/// Suspend the coroutine until an event is fired on the identified pump +/// or the timeout duration has elapsed. If the timeout duration +/// elapses the specified LLSD is returned. +LLSD suspendUntilEventOnWithTimeout(const LLEventPumpOrPumpName& suspendPumpOrName, F32 timeoutin, const LLSD &timeoutResult); } // namespace llcoro -- cgit v1.2.3