{
u_arraylist_t* threads_list;
oc_mutex list_lock;
+ bool isFree;
} ca_thread_pool_details_t;
/**
goto exit;
}
+ (*thread_pool)->details->isFree = false;
+
OIC_LOG(DEBUG, TAG, "OUT");
return CA_STATUS_OK;
return CA_STATUS_FAILED;
}
+ if(thread_pool->details->isFree){
+ OIC_LOG(INFO, TAG, "thread pool tasks already freed");
+ return CA_STATUS_OK;
+ }
+
oc_mutex_lock(thread_pool->details->list_lock);
for (uint32_t i = 0; i < u_arraylist_length(thread_pool->details->threads_list); ++i)
{
oc_mutex_lock(thread_pool->details->list_lock);
+ thread_pool->details->isFree = true;
+
for (uint32_t i = 0; i < u_arraylist_length(thread_pool->details->threads_list); ++i)
{
ca_thread_pool_thread_info_t *threadInfo = (ca_thread_pool_thread_info_t *)