cedric pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=3fab2729067b34111d3208c7ca0b273b90241114

commit 3fab2729067b34111d3208c7ca0b273b90241114
Author: Cedric BAIL <ced...@osg.samsung.com>
Date:   Mon Dec 5 17:08:50 2016 -0800

    evas: add capability to know if a thread has been cancelled.
---
 src/lib/evas/cache/evas_preload.c   | 6 ++++++
 src/lib/evas/include/evas_private.h | 1 +
 2 files changed, 7 insertions(+)

diff --git a/src/lib/evas/cache/evas_preload.c 
b/src/lib/evas/cache/evas_preload.c
index cd299e6..f18d5b6 100644
--- a/src/lib/evas/cache/evas_preload.c
+++ b/src/lib/evas/cache/evas_preload.c
@@ -131,3 +131,9 @@ evas_preload_thread_cancel(Evas_Preload_Pthread *work)
 {
    return ecore_thread_cancel(work->thread);
 }
+
+Eina_Bool
+evas_preload_thread_cancelled_is(Evas_Preload_Pthread *work)
+{
+   return ecore_thread_check(work->thread);
+}
diff --git a/src/lib/evas/include/evas_private.h 
b/src/lib/evas/include/evas_private.h
index a334ed1..1ac7e13 100644
--- a/src/lib/evas/include/evas_private.h
+++ b/src/lib/evas/include/evas_private.h
@@ -1951,6 +1951,7 @@ Evas_Preload_Pthread *evas_preload_thread_run(void 
(*func_heavy)(void *data),
                                               void (*func_cancel)(void *data),
                                               const void *data);
 Eina_Bool evas_preload_thread_cancel(Evas_Preload_Pthread *thread);
+Eina_Bool evas_preload_thread_cancelled_is(Evas_Preload_Pthread *thread);
 
 void _evas_walk(Evas_Public_Data *e_pd);
 void _evas_unwalk(Evas_Public_Data *e_pd);

-- 


Reply via email to