Exemplo n.º 1
0
ErrorHandler* ErrorHandler::defaultHandler()
{
	// NOTE: Since this is called to initialize the static _pHandler
	// variable, sh has to be a local static, otherwise we run
	// into static initialization order issues.
	static SingletonHolder<ErrorHandler> sh;
	return sh.get();
}
Exemplo n.º 2
0
Reactor& Reactor::instance()
{
	
	static SingletonHolder<Reactor> sh; 
	
	Reactor* p = sh.get();

	Reactor& tmp = *p;
	
	return tmp;
}
Exemplo n.º 3
0
ThreadLocalStorage& ThreadLocalStorage::current()
{
	Thread* pThread = Thread::current();
	if (pThread)
	{
		return pThread->tls();
	}
	else
	{
		static SingletonHolder<ThreadLocalStorage, FastMutex> sh;
		return *sh.get();
	}
}
Exemplo n.º 4
0
LoggingRegistry& LoggingRegistry::defaultRegistry()
{
    static SingletonHolder<LoggingRegistry> sh;
    return *sh.get();
}
Exemplo n.º 5
0
URIStreamOpener& URIStreamOpener::defaultOpener()
{
	static SingletonHolder<URIStreamOpener> sh;
	return *sh.get();
}
PriorityNotificationQueue& PriorityNotificationQueue::defaultQueue()
{
	static SingletonHolder<PriorityNotificationQueue> sh;
	return *sh.get();
}
Exemplo n.º 7
0
LoggingFactory& LoggingFactory::defaultFactory()
{
	static SingletonHolder<LoggingFactory> sh;
	return *sh.get();
}
Exemplo n.º 8
0
TextEncodingManager& TextEncoding::manager()
{
	static SingletonHolder<TextEncodingManager> sh;
	return *sh.get();
}