From 0fddfe199fc5d723c431d69a91cbea4c3287dc03 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Fri, 6 Apr 2018 10:08:23 -0700 Subject: [PATCH] ecore: poll the thread pipe twice during shutdown Summary: this resolves a race condition when a thread join was pending during shutdown but a pipe write was needed in order for the join to be successfully executed before shutdown had occurred @fix Reviewers: cedric Reviewed By: cedric Subscribers: cedric Differential Revision: https://phab.enlightenment.org/D5866 Reviewed-by: Cedric Bail --- src/lib/ecore/ecore.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/lib/ecore/ecore.c b/src/lib/ecore/ecore.c index a7a4850f67..dce0b55a8f 100644 --- a/src/lib/ecore/ecore.c +++ b/src/lib/ecore/ecore.c @@ -424,6 +424,7 @@ ecore_shutdown(void) * It should be fine now as we do wait for thread to shutdown before * we try to destroy the pipe. */ + _ecore_pipe_wait(_thread_call, 1, 0.1); p = _thread_call; _thread_call = NULL; _ecore_pipe_wait(p, 1, 0.1);