Fix deadlock issue of AsyncTaskThread 72/287072/1
authorHeeyong Song <heeyong.song@samsung.com>
Thu, 19 Jan 2023 08:46:20 +0000 (17:46 +0900)
committerHeeyong Song <heeyong.song@samsung.com>
Thu, 19 Jan 2023 08:46:28 +0000 (17:46 +0900)
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

index a1ed1ce70ce7f14bcd2f4d2c5c75955931728e96..55ebe7add3ed5a0fe1356df1eea8efcab6770afb 100644 (file)
@@ -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
     {