From 566b45a11987fa4532ea60e9e2fc633494f3217f Mon Sep 17 00:00:00 2001 From: Heeyong Song Date: Thu, 19 Jan 2023 17:46:20 +0900 Subject: [PATCH] Fix deadlock issue of AsyncTaskThread mDestroyThread may be changed to true after while(!mDestroyThread) because we don't lock the part. Change-Id: Icf9c60cd865d73f1648a354331689df8284d5964 --- dali/internal/system/common/async-task-manager-impl.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/dali/internal/system/common/async-task-manager-impl.cpp b/dali/internal/system/common/async-task-manager-impl.cpp index a1ed1ce70..55ebe7add 100644 --- a/dali/internal/system/common/async-task-manager-impl.cpp +++ b/dali/internal/system/common/async-task-manager-impl.cpp @@ -109,8 +109,11 @@ void AsyncTaskThread::Run() if(!task) { ConditionalWait::ScopedLock lock(mConditionalWait); - mIsThreadIdle = true; - mConditionalWait.Wait(lock); + if(!mDestroyThread) + { + mIsThreadIdle = true; + mConditionalWait.Wait(lock); + } } else { -- 2.34.1