cedric pushed a commit to branch master.


commit 0fddfe199fc5d723c431d69a91cbea4c3287dc03
Author: Mike Blumenkrantz <zm...@osg.samsung.com>
Date:   Fri Apr 6 10:08:23 2018 -0700

    ecore: poll the thread pipe twice during shutdown
    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
    Reviewers: cedric
    Reviewed By: cedric
    Subscribers: cedric
    Differential Revision: https://phab.enlightenment.org/D5866
    Reviewed-by: Cedric Bail <ced...@osg.samsung.com>
 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);


Reply via email to