summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsingleton.h
AgeCommit message (Collapse)Author
2016-08-30Automated merge with ssh://bitbucket.org/lindenlab/viewer-releaseNat Goodspeed
2015-11-10remove execute permission from many files that should not have itOz Linden
2015-06-30MAINT-5232: Add tests for new LLSingleton dependency functionality.Nat Goodspeed
2015-06-26MAINT-5232: Use LLError::Log::demangle() to log LLSingleton classes.Nat Goodspeed
2015-06-26MAINT-5232: Loosen LLSingleton circularity constraints slightly.Nat Goodspeed
LLSingleton explicitly supports circular dependencies: initialization performed during an LLSingleton subclass's initSingleton() method may recursively call that same subclass's getInstance() method. On the other hand, circularity from a subclass constructor cannot be permitted, else getInstance() would have to return a partially-constructed object. Our dependency tracking circularity check initially forbade both. Loosen it to permit references from within initSingleton().
2015-06-25MAINT-5232: Correct forward declaration of LLSingleton_manage_master.Nat Goodspeed
The forward declaration said it was a 'friend class', whereas the actual definition is a struct. MSVC dislikes that.
2015-06-25MAINT-5232: Try to avoid circularity between LLError and LLSingleton.Nat Goodspeed
Part of LLError's logging infrastructure is implemented with an LLSingleton. Therefore, attempts to log from within LLSingleton machinery could potentially go south if LLError's LLSingleton is not yet initialized. Introduce LLError::is_available() in llerrorcontrol.h and llerror.cpp. Make LLSingletonBase::logwarns() and logerrs() consult LLError::is_available() before attempting to use LL_WARNS or LL_ERRS, respectively. Moreover, make all LLSingleton internal logging use logwarns() and logerrs() instead of directly engaging LL_ERRS or LL_WARNS.
2015-06-24MAINT-5232: Introduce inter-LLSingleton dependency tracking.Nat Goodspeed
Introduce LLSingleton::cleanupSingleton() canonical method as the place to put any subclass cleanup logic that might take nontrivial realtime or throw an exception. Neither is appropriate in a destructor. Track all extant LLSingleton subclass instances on a master list, which permits adding LLSingletonBase::cleanupAll() and deleteAll() methods. Also notice when any LLSingleton subclass constructor (or initSingleton() method) calls instance() or getInstance() for another LLSingleton, and capture that other LLSingleton instance as a dependency of the first. This permits cleanupAll() and deleteAll() to perform a dependency sort on the master list, thus cleaning up (or deleting) leaf LLSingletons AFTER the LLSingletons that depend on them. Make C++ runtime's final static destructor call LLSingletonBase::deleteAll() instead of deleting individual LLSingleton instances in arbitrary order. Eliminate "llerror.h" from llsingleton.h, a longstanding TODO.
2015-05-28MAINT-5232: Stop documenting deprecated alternative LLSingleton usage.Nat Goodspeed
2015-05-22MAINT-5232: Clean up some dubious LLSingleton methods.Nat Goodspeed
Remove evil getIfExists() method, used by no one. Remove evil destroyed() method, used in exactly three places -- one of which is a test. Replace with equally evil instanceExists() method, which is used EVERYWHERE -- sigh.
2013-08-09second phase summer cleaningRichard Linden
replace llinfos, lldebugs, etc with new LL_INFOS(), LL_DEBUGS(), etc.
2013-06-05merge with viewer-releaseRichard Linden
2013-05-20BUILDFIX: mac gcc fixRichard Linden
2013-05-02SH-4080 WIP interesting: random crash on MacRichard Linden
added comments to llsingleton.h
2013-04-29SH-4080 WIP interesting: random crash on MacRichard Linden
fixed singleton unit test resurrecting a singleton now properly calls initSingleton()
2013-04-27SH-4080 WIP interesting: random crash on MacRichard Linden
more singleton cleanup to eliminate crashes on startup/exit
2013-04-26SH-4080 WIP interesting: random crash on MacRichard Linden
fixed Mac crash related to non-reentrant singleton constructor
2013-04-26SH-4080 WIP interesting: random crash on MacRichard Linden
fixed Mac crash related to non-reentrant singleton constructor
2013-04-24BUILDFIX: singleton unit test could not resurrect singletonRichard Linden
2013-04-24BUILDFIX: method name was wrongRichard Linden
2013-04-24SH-4080 WIP interesting: random crash on MacRichard Linden
potential fix for crasher cleaned up llsingleton
2013-03-29Update Mac and Windows breakpad builds to latestGraham Madarasz
2013-01-03SH-3406 WIP convert fast timers to lltrace systemRichard Linden
made fast timer stack thread local added LLThreadLocalSingleton made LLThreadLocalPointer obey pointer rules for const added LLThreadLocalSingletonPointer for fast thread local pointers
2011-09-06LLProxy code review fixes.Logan Dethrow
* Removed check_curl_code and check_curl_multi_code from the global namespace. * Added comments documenting which thread the public methods of LLProxy should be called from. * Corrected grammar in LLSingleton.h * Fixed a buffer scope problem in llpacketring.cpp.
2011-09-01Clarified the reason for adding the deleteSingleton method to LLSingleton. ↵Logan Dethrow
Added a simple unit test to verify the functionality of the deleteSingleton method.
2011-07-21STORM-1112 Protected LLProxy members during cross-thread calls to ↵Logan Dethrow
LLProxy::applyProxySettings()
2010-08-13Change license from GPL to LGPL (version 2.1)Oz Linden
2009-11-30Linker optimization - use "extern template" for commonly regenerated templatesJames Cook
Also replaced many duplicate calls to LLViewerCamera::getInstance() with local pointer. Reviewed with Ambroff
2009-08-06Add on-demand allocation of LLSingletonRegistry::sSingletonMap so we don't ↵brad kittenbrink
rely on static initialization order. reviewed by nat.
2009-08-05Merged in my DEV-35401 "doubleton" fix.brad kittenbrink
2009-08-05Attemt at fixing "doubleton" problems across shared lib boundaries. ↵brad kittenbrink
Singletons now keep their SingletonInstaceData in a big global map in the llcommon module.
2009-08-04svn merge -r 128442:129343 ↵Richard Nelson
svn+ssh://svn.lindenlab.com/svn/linden/branches/skinning/skinning-18 into svn+ssh://svn.lindenlab.com/svn/linden/branches/viewer/viewer-2.0.0-3
2009-06-21merge -r 122421-124917 viewer-2.0.0-2 -> viewer-2.0.0-3Steven Bennetts
ignore-dead-branch