/*
- * Copyright (c) 2021 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2023 Samsung Electronics Co., Ltd.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
if(gSingletonServiceLogFilter && gSingletonServiceLogFilter->IsEnabledFor(level)) \
{ \
std::string string(message); \
- Dali::TizenPlatform::LogMessage(Debug::DebugInfo, string); \
+ Dali::TizenPlatform::LogMessage(Debug::INFO, string); \
}
#define DALI_LOG_SINGLETON_SERVICE(level, format, ...) DALI_LOG_INFO(gSingletonServiceLogFilter, level, format, ##__VA_ARGS__)
{
namespace
{
-thread_local ThreadLocalStorage* threadLocal = nullptr;
-}
+thread_local ThreadLocalStorage* threadLocal = nullptr;
+thread_local bool isShuttingDown = false;
+} // namespace
ThreadLocalStorage::ThreadLocalStorage(Core* core)
: mCore(core)
{
DALI_ASSERT_ALWAYS(threadLocal == nullptr && "Cannot create more than one ThreadLocalStorage object");
- threadLocal = this;
+ threadLocal = this;
+ isShuttingDown = false;
}
ThreadLocalStorage::~ThreadLocalStorage() = default;
void ThreadLocalStorage::Remove()
{
- threadLocal = nullptr;
+ threadLocal = nullptr;
+ isShuttingDown = true;
}
ThreadLocalStorage& ThreadLocalStorage::Get()
return (threadLocal != nullptr);
}
+bool ThreadLocalStorage::IsShuttingDown()
+{
+ return isShuttingDown;
+}
+
ThreadLocalStorage* ThreadLocalStorage::GetInternal()
{
return threadLocal;