summaryrefslogtreecommitdiff
path: root/indra/llcommon/llcoros.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2019-10-24 12:54:38 -0400
committerNat Goodspeed <nat@lindenlab.com>2020-03-25 19:02:24 -0400
commitcbf146f2b3fc255bc83f2b01101dc29658bea6ea (patch)
treeda7bc386376e825eda480dc166495434543d5fcd /indra/llcommon/llcoros.h
parent7541e784d991888d6f600f4cb9439d5fcf15e452 (diff)
DRTVWR-476: Pump coroutines a few more times when we start quitting.
By the time "LLApp" listeners are notified that the app is quitting, the mainloop is no longer running. Even though those listeners do things like close work queues and inject exceptions into pending promises, any coroutines waiting on those resources must regain control before they can notice and shut down properly. Add a final "LLApp" listener that resumes ready coroutines a few more times. Make sure every other "LLApp" listener is positioned before that new one.
Diffstat (limited to 'indra/llcommon/llcoros.h')
-rw-r--r--indra/llcommon/llcoros.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/indra/llcommon/llcoros.h b/indra/llcommon/llcoros.h
index de7b691284..171d1ebd2a 100644
--- a/indra/llcommon/llcoros.h
+++ b/indra/llcommon/llcoros.h
@@ -34,6 +34,7 @@
#include <boost/fiber/future/promise.hpp>
#include <boost/fiber/future/future.hpp>
#include "llsingleton.h"
+#include "llevents.h"
#include <boost/ptr_container/ptr_map.hpp>
#include <boost/function.hpp>
#include <string>
@@ -284,6 +285,8 @@ private:
typedef boost::ptr_map<std::string, CoroData> CoroMap;
CoroMap mCoros;
+ LLTempBoundListener mAppListener;
+
// Identify the current coroutine's CoroData. This local_ptr isn't static
// because it's a member of an LLSingleton, and we rely on it being
// cleaned up in proper dependency order.