bu5hm4n pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=04d209e238a9429268d5045316926056222e0825

commit 04d209e238a9429268d5045316926056222e0825
Author: Mike Blumenkrantz <[email protected]>
Date:   Tue Jun 26 16:35:55 2018 -0400

    ecore/thread: flush main loop threads while waiting during shutdown
    
    if a thread is actively waiting on the main loop in order to proceed
    with its exit, a flush here avoids the case where the thread waits
    until the main loop has exited
    
    Differential Revision: https://phab.enlightenment.org/D6437
---
 src/lib/ecore/ecore_thread.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/lib/ecore/ecore_thread.c b/src/lib/ecore/ecore_thread.c
index ab58c0eea4..a00eb5fb48 100644
--- a/src/lib/ecore/ecore_thread.c
+++ b/src/lib/ecore/ecore_thread.c
@@ -627,7 +627,11 @@ _ecore_thread_shutdown(void)
           }
         SLKU(_ecore_pending_job_threads_mutex);
         iteration++;
-        if (test) usleep(1000);
+        if (test)
+          {
+             _ecore_main_call_flush();
+             usleep(1000);
+          }
      } while (test == EINA_TRUE && iteration < 50);
 
    if (iteration == 20 && _ecore_thread_count > 0)

-- 


Reply via email to