diff options
author | simon <none@none> | 2013-04-17 11:17:46 -0700 |
---|---|---|
committer | simon <none@none> | 2013-04-17 11:17:46 -0700 |
commit | 6742d90d39fbb5c5bc3b675f37841fd6c8ec09c9 (patch) | |
tree | 841285193b28a3c971051f53573a2a2f1c83a330 /indra/llcommon/llinstancetracker.h | |
parent | c537b63936e49d4e685d96695334fdd7a961b470 (diff) |
Some minor cleanups while hunting crashes. Reviewed by Kelly
Diffstat (limited to 'indra/llcommon/llinstancetracker.h')
-rw-r--r-- | indra/llcommon/llinstancetracker.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/indra/llcommon/llinstancetracker.h b/indra/llcommon/llinstancetracker.h index 0f952f56ac..b290526754 100644 --- a/indra/llcommon/llinstancetracker.h +++ b/indra/llcommon/llinstancetracker.h @@ -102,6 +102,8 @@ protected: }; }; +LL_COMMON_API void assert_main_thread(); + /// This mix-in class adds support for tracking all instances of the specified class parameter T /// The (optional) key associates a value of type KEY with a given instance of T, for quick lookup /// If KEY is not provided, then instances are stored in a simple set @@ -116,7 +118,11 @@ class LLInstanceTracker : public LLInstanceTrackerBase InstanceMap sMap; }; static StaticData& getStatic() { return LLInstanceTrackerBase::getStatic<StaticData, MyT, T, TRACKED>(); } - static InstanceMap& getMap_() { return getStatic().sMap; } + static InstanceMap& getMap_() + { + // assert_main_thread(); fwiw this class is not thread safe, and it used by multiple threads. Bad things happen. + return getStatic().sMap; + } public: class instance_iter : public boost::iterator_facade<instance_iter, T, boost::forward_traversal_tag> |