summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2018-06-26 16:35:55 -0400
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2018-06-28 18:08:45 +0200
commit04d209e238a9429268d5045316926056222e0825 (patch)
tree1b618c2c4d924e0b8ece21071fc92ec1576c542a
parent2ee83cc28dbfb5116a7064af6162305297a24d51 (diff)
downloadefl-04d209e238a9429268d5045316926056222e0825.tar.gz
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
-rw-r--r--src/lib/ecore/ecore_thread.c6
1 files changed, 5 insertions, 1 deletions
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)