Fixed not to sleep thread before it's terminated 94/79694/2
authorJonghyun Ho <jonghyun.ho@samsung.com>
Tue, 12 Jul 2016 09:44:02 +0000 (18:44 +0900)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Tue, 12 Jul 2016 10:37:12 +0000 (03:37 -0700)
[Problem] Device hanged for a while inserting camera captured image to memo
[Cause & Measure] Thread falls asleep right before calling pthread_join
[Checking Method] Fixed not to sleep thread before it's terminated

Change-Id: Iea4ea4b7ef6877667cbe7c0ee21bdde58986c174
Signed-off-by: Adeel Kazmi <adeel.kazmi@samsung.com>
adaptors/base/combined-update-render/combined-update-render-controller.cpp

index d039090..a1496db 100644 (file)
@@ -587,7 +587,8 @@ void CombinedUpdateRenderController::PostRenderWaitForCompletion()
 {
   ConditionalWait::ScopedLock lock( mUpdateRenderThreadWaitCondition );
   while( mPostRendering &&
-         ! mNewSurface ) // We should NOT wait if we're replacing the surface
+         ! mNewSurface &&                // We should NOT wait if we're replacing the surface
+         ! mDestroyUpdateRenderThread )
   {
     mUpdateRenderThreadWaitCondition.Wait( lock );
   }