evas: make sure we always wait in the correct thread.

This commit is contained in:
Cedric BAIL 2017-02-02 10:29:39 -08:00
parent 4aee312774
commit ddf1907217
1 changed files with 8 additions and 1 deletions

View 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;
}