From 02d1db1a79bd548387eeee3a9911cbafe9d45768 Mon Sep 17 00:00:00 2001
From: "Piotr Kosko/Tizen API (PLT) /SRPOL/Engineer/Samsung Electronics"
Date: Wed, 10 Nov 2021 10:31:08 +0100
Subject: [PATCH] [Common] Changes TaskQueue to thread_local storage duration
This change is to prevent issues with accessing same TaskQueue object by
several threads in multi-thread service model introduced in Tizen 6.5.
Similar change -
https://review.tizen.org/gerrit/#/c/platform/core/api/webapi-plugins/+/263367/
[Verification] executed all automatic TCT - 100% passrate.
Change-Id: I0c8ac1d7ffe1a9fad08eda6e2129abf659cbe9db
---
src/common/task-queue.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/common/task-queue.cpp b/src/common/task-queue.cpp
index 139f554..0f7a331 100644
--- a/src/common/task-queue.cpp
+++ b/src/common/task-queue.cpp
@@ -19,7 +19,7 @@
namespace common {
TaskQueue& TaskQueue::GetInstance() {
- static TaskQueue task_queue;
+ thread_local TaskQueue task_queue;
return task_queue;
}
--
2.7.4