From a6ea2dbedcf54b6a847d894b77777cc88698a28d Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Mon, 19 Jul 2021 23:27:00 +0300 Subject: SL-15292 Voice's singleton shutdown before voice's coroutine --- indra/llcommon/llcoros.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'indra/llcommon/llcoros.cpp') diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 23419a52a7..7ad10f206e 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -131,6 +131,13 @@ LLCoros::LLCoros(): LLCoros::~LLCoros() { +} + +void LLCoros::cleanupSingleton() +{ + // Some of the coroutines (like voice) will depend onto + // origin singletons, so clean coros before deleting those + printActiveCoroutines("at entry to ~LLCoros()"); // Other LLApp status-change listeners do things like close // work queues and inject the Stop exception into pending @@ -146,6 +153,8 @@ LLCoros::~LLCoros() { // don't use llcoro::suspend() because that module depends // on this one + // This will yield current(main) thread and will let active + // corutines run once boost::this_fiber::yield(); } printActiveCoroutines("after pumping"); -- cgit v1.2.3