diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-10-21 09:39:00 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-10-21 09:40:17 +0900 |
commit | a7f491bafa035de527c3602bcfbed2d096f750d3 (patch) | |
tree | 48694aaf2a69c07f03d3871b9334e1264bc9d89b | |
parent | 67d9f71df4bb940be0bdcb2f8d4c0dd0f4e73ac5 (diff) | |
download | efl-a7f491bafa035de527c3602bcfbed2d096f750d3.tar.gz |
ecore anim - actually fix by checking fd not thread handle
this should remove a 0.5 sec or so pause at shutdown of efl apps.
@fix
-rw-r--r-- | src/lib/ecore/ecore_anim.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/ecore/ecore_anim.c b/src/lib/ecore/ecore_anim.c index 7f920ecd6e..66d08cf68b 100644 --- a/src/lib/ecore/ecore_anim.c +++ b/src/lib/ecore/ecore_anim.c @@ -65,9 +65,9 @@ static Ecore_Cb end_tick_cb = NULL; static const void *end_tick_data = NULL; static Eina_Bool animator_ran = EINA_FALSE; -static int timer_fd_read = -1; -static int timer_fd_write = -1; -static volatile Ecore_Thread *timer_thread = NULL; +static volatile int timer_fd_read = -1; +static volatile int timer_fd_write = -1; +static Ecore_Thread *timer_thread = NULL; static volatile int timer_event_is_busy = 0; static void @@ -215,7 +215,9 @@ _timer_tick_quit(void) if (timer_fd_read < 0) return; _tick_send(-1); - for (i = 0; (i < 500) && (timer_thread); i++) + // SHOULd use this, but broken if thread shutting down already: + // ecore_thread_wait(timer_thread, 0.5); + for (i = 0; (i < 500) && (timer_fd_write >= 0); i++) { usleep(1000); } |