summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsingleton.h
diff options
context:
space:
mode:
authorNat Goodspeed <nat@lindenlab.com>2017-03-13 14:09:14 -0400
committerNat Goodspeed <nat@lindenlab.com>2017-03-13 14:09:14 -0400
commit1a8c8df6862620de64f621363b025b0ffbef72fa (patch)
treea6a9d5d0295f9d3d1dabdafe7dbebc6f69ea61a9 /indra/llcommon/llsingleton.h
parent04c3f2b0f0e6cc2a2a64007ae179072ed45102b5 (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.h8
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
{