From 75b5f72e6951cae855a6abacc110a886e0ae701c Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 26 Jun 2020 14:40:07 -0400 Subject: DRTVWR-476, SL-13512: Fix flawed fix for former failure. Specifically, llcoro::suspendUntilTimeout() is definitely called concurrently by multiple coroutines. New code that instantiates a local LLEventStream must allow the name to be tweaked for uniqueness. --- indra/llcommon/lleventcoro.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llcommon') diff --git a/indra/llcommon/lleventcoro.cpp b/indra/llcommon/lleventcoro.cpp index bc02ab99de..995356dc52 100644 --- a/indra/llcommon/lleventcoro.cpp +++ b/indra/llcommon/lleventcoro.cpp @@ -124,7 +124,11 @@ void llcoro::suspendUntilTimeout(float seconds) // Wait for an event on a bogus LLEventPump on which nobody ever posts // events. Don't make it static because that would force instantiation of // the LLEventPumps LLSingleton registry at static initialization time. - LLEventStream bogus("xyzzy"); // could use an LLUUID if it matters + // DO allow tweaking the name for uniqueness, this definitely gets + // re-entered on multiple coroutines! + // We could use an LLUUID if it were important to actively prohibit anyone + // from ever posting on this LLEventPump. + LLEventStream bogus("xyzzy", true); // Timeout is the NORMAL case for this call! static LLSD timedout; // Deliver, but ignore, timedout when (as usual) we did not receive any -- cgit v1.2.3