evas: make sure we always wait in the correct thread.
authorCedric BAIL <cedric@osg.samsung.com>
Thu, 2 Feb 2017 18:29:39 +0000 (10:29 -0800)
committerCedric BAIL <cedric@osg.samsung.com>
Thu, 2 Feb 2017 18:30:39 +0000 (10:30 -0800)
src/lib/evas/cache/evas_preload.c

index f400a71..649309d 100644 (file)
@@ -142,6 +142,13 @@ evas_preload_thread_cancelled_is(Evas_Preload_Pthread *work)
 Eina_Bool
 evas_preload_pthread_wait(Evas_Preload_Pthread *work, double wait)
 {
+   Eina_Bool r;
+
    if (!work) return EINA_TRUE;
-   return ecore_thread_wait(work->thread, wait);
+
+   ecore_thread_main_loop_begin();
+   r = ecore_thread_wait(work->thread, wait);
+   ecore_thread_main_loop_end();
+
+   return r;
 }