From: Andrew Cox Date: Tue, 24 Jun 2014 10:24:06 +0000 (+0100) Subject: Disable Late-cancels of in-flight resource loads using boost::thread interrupt() X-Git-Tag: dali_1.0.0~18 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F33%2F24133%2F1;p=platform%2Fcore%2Fuifw%2Fdali-adaptor.git Disable Late-cancels of in-flight resource loads using boost::thread interrupt() Change-Id: I992d18a8f33582bf9c6f769e9244edc86a2d3153 Signed-off-by: Andrew Cox Signed-off-by: Adeel Kazmi --- diff --git a/platform-abstractions/slp/resource-loader/resource-thread-base.cpp b/platform-abstractions/slp/resource-loader/resource-thread-base.cpp index 248eb93..41c65ca 100644 --- a/platform-abstractions/slp/resource-loader/resource-thread-base.cpp +++ b/platform-abstractions/slp/resource-loader/resource-thread-base.cpp @@ -96,12 +96,12 @@ void ResourceThreadBase::CancelRequest( Integration::ResourceId resourceId ) unique_lock lock( mMutex ); // See if the request is already launched as the current job on the thread: - if( mCurrentRequestId == resourceId ) - { - mThread->interrupt(); - } + //if( mCurrentRequestId == resourceId ) + //{ + // mThread->interrupt(); + //} // Check the pending requests to be cancelled: - else + //else { for( RequestQueueIter iterator = mQueue.begin(); iterator != mQueue.end(); @@ -164,6 +164,8 @@ void ResourceThreadBase::ThreadLoop() // No problem, thread was just interrupted from the outside to cancel an in-flight request. boost::thread_interrupted* disableUnusedVarWarning = &ex; ex = *disableUnusedVarWarning; + // Temporary logging of an unexpected boost::thread_interrupted exception: + DALI_LOG_ERROR( "boost::thread_interrupted caught in resource thread in build with late cancellation disabled (should not happen). Aborting request with id %u.\n", unsigned(mCurrentRequestId) ); } // Since we have an exception handler here anyway, lets catch everything to avoid killing the process: