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.
master
Nat Goodspeed 2020-06-26 14:40:07 -04:00
parent e7d3b7cc93
commit 75b5f72e69
1 changed files with 5 additions and 1 deletions

View File

@ -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