aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore/ecore.c
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2011-12-15 14:10:42 +0000
committerCarsten Haitzler <raster@rasterman.com>2011-12-15 14:10:42 +0000
commit94e5832ce84f31cb959623ac54dea9a2ceada78e (patch)
tree0287edd19b3e8458511b27480f46e23cd68c7314 /legacy/ecore/src/lib/ecore/ecore.c
parentlets not use uninitialized vars shall we? (diff)
downloadefl-94e5832ce84f31cb959623ac54dea9a2ceada78e.tar.gz
see comments for info. a short workaround for now.
SVN revision: 66258
Diffstat (limited to 'legacy/ecore/src/lib/ecore/ecore.c')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore.c b/legacy/ecore/src/lib/ecore/ecore.c
index cc83b16357..3430e974ac 100644
--- a/legacy/ecore/src/lib/ecore/ecore.c
+++ b/legacy/ecore/src/lib/ecore/ecore.c
@@ -217,14 +217,23 @@ shutdown_evil:
EAPI int
ecore_shutdown(void)
{
+ Ecore_Pipe *p;
/*
* take a lock here because _ecore_event_shutdown() does callbacks
*/
_ecore_lock();
if (--_ecore_init_count != 0)
goto unlock;
-
- ecore_pipe_del(_thread_call);
+
+ /* this looks horrible - a hack for now, but something to note. as
+ * we delete the _thread_call pipe a thread COULD be doing
+ * ecore_pipe_write() or what not to it at the same time - we
+ * must ensure all possible users of this _thread_call are finished
+ * and exited before we delete it here */
+ p = _thread_call;
+ _thread_call = NULL;
+ ecore_pipe_wait(p, 1, 0.1);
+ ecore_pipe_del(p);
eina_lock_free(&_thread_safety);
eina_condition_free(&_thread_cond);
eina_lock_free(&_thread_mutex);