summaryrefslogtreecommitdiff
path: root/indra/newview/lldrawpoolsimple.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-10-22 17:14:26 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 19:02:24 -0400
commit1345a02b21a83bc4ee7ff72efc1858e956f18c53 (patch)
treea85a70d9691eb5fb35063b971e729cca30ab7e23 /indra/newview/lldrawpoolsimple.h
parent28a54c2f7b25b9fda763c51746701f0cd21c8018 (diff)
DRTVWR-476: Terminate long-lived coroutines to avoid shutdown crash.
Add LLCoros::TempStatus instances around known suspension points so printActiveCoroutines() can report what each suspended coroutine is waiting for. Similarly, sprinkle checkStop() calls at known suspension points. Make LLApp::setStatus() post an event to a new LLEventPump "LLApp" with a string corresponding to the status value being set, but only until ~LLEventPumps() -- since setStatus() also gets called very late in the application's lifetime. Make postAndSuspendSetup() (used by postAndSuspend(), suspendUntilEventOn(), postAndSuspendWithTimeout(), suspendUntilEventOnWithTimeout()) add a listener on the new "LLApp" LLEventPump that pushes the new LLCoros::Stopping exception to the coroutine waiting on the LLCoros::Promise. Make it return the new LLBoundListener along with the previous one. Accordingly, make postAndSuspend() and postAndSuspendWithTimeout() store the new LLBoundListener returned by postAndSuspendSetup() in a LLTempBoundListener (as with the previous one) so it will automatically disconnect once the wait is over. Make each LLCoprocedurePool instance listen on "LLApp" with a listener that closes the queue on which new work items are dispatched. Closing the queue causes the waiting dispatch coroutine to terminate. Store the connection in an LLTempBoundListener on the LLCoprocedurePool so it will disconnect automatically on destruction. Refactor the loop in coprocedureInvokerCoro() to instantiate TempStatus around the suspending call. Change a couple spammy LL_INFOS() calls to LL_DEBUGS(). Give all logging calls in that module a "CoProcMgr" tag to make it straightforward to re-enable the LL_DEBUGS() calls as desired.
Diffstat (limited to 'indra/newview/lldrawpoolsimple.h')
0 files changed, 0 insertions, 0 deletions