diff options
author | Nat Goodspeed <nat@lindenlab.com> | 2017-03-13 14:09:14 -0400 |
---|---|---|
committer | Nat Goodspeed <nat@lindenlab.com> | 2017-03-13 14:09:14 -0400 |
commit | 1a8c8df6862620de64f621363b025b0ffbef72fa (patch) | |
tree | a6a9d5d0295f9d3d1dabdafe7dbebc6f69ea61a9 /indra/llcommon/llsingleton.h | |
parent | 04c3f2b0f0e6cc2a2a64007ae179072ed45102b5 (diff) |
DRTVWR-418: Ignore logging that requires resurrecting singletons.
The logging subsystem depends on two different LLSingletons for some reason.
It turns out to be very difficult to completely avoid executing any logging
calls after the LLSingletonBase::deleteAll(), but we really don't want to
resurrect those LLSingletons so late in the run for a couple stragglers.
Introduce LLSingleton::wasDeleted() query method, and use it in logging
subsystem to simply bypass last-millisecond logging requests.
Diffstat (limited to 'indra/llcommon/llsingleton.h')
-rw-r--r-- | indra/llcommon/llsingleton.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/indra/llcommon/llsingleton.h b/indra/llcommon/llsingleton.h index 1b915dfd6e..0d4a1f34f8 100644 --- a/indra/llcommon/llsingleton.h +++ b/indra/llcommon/llsingleton.h @@ -452,6 +452,14 @@ public: return sData.mInitState == INITIALIZED; } + // Has this singleton been deleted? This can be useful during shutdown + // processing to avoid "resurrecting" a singleton we thought we'd already + // cleaned up. + static bool wasDeleted() + { + return sData.mInitState == DELETED; + } + private: struct SingletonData { |