aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/ecore/src/lib/ecore/ecore.c
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@free.fr>2012-05-08 03:50:22 +0000
committerCedric BAIL <cedric.bail@free.fr>2012-05-08 03:50:22 +0000
commited1bdf1b7b506a55177be6a7a8a271bb92f94bfb (patch)
tree87bee5ba16640a20478337dd3d22d87a6f359e3c /legacy/ecore/src/lib/ecore/ecore.c
parentAnd make map work with cserve2 (diff)
downloadefl-ed1bdf1b7b506a55177be6a7a8a271bb92f94bfb.tar.gz
ecore: don't run out of fd when crazy apps cycle through ecore_init/ecore_shutdown.
SVN revision: 70860
Diffstat (limited to 'legacy/ecore/src/lib/ecore/ecore.c')
-rw-r--r--legacy/ecore/src/lib/ecore/ecore.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/legacy/ecore/src/lib/ecore/ecore.c b/legacy/ecore/src/lib/ecore/ecore.c
index ea5b5cf58a..7fbe943022 100644
--- a/legacy/ecore/src/lib/ecore/ecore.c
+++ b/legacy/ecore/src/lib/ecore/ecore.c
@@ -171,12 +171,16 @@ ecore_init(void)
_ecore_job_init();
_ecore_time_init();
- eina_lock_new(&_thread_safety);
eina_lock_new(&_thread_mutex);
eina_condition_new(&_thread_cond, &_thread_mutex);
eina_lock_new(&_thread_feedback_mutex);
eina_condition_new(&_thread_feedback_cond, &_thread_feedback_mutex);
- _thread_call = ecore_pipe_add(_thread_callback, NULL);
+ if (!_thread_call)
+ {
+ _thread_call = ecore_pipe_add(_thread_callback, NULL);
+ eina_lock_new(&_thread_safety);
+ }
+
eina_lock_new(&_thread_id_lock);
eina_lock_new(&_ecore_main_loop_lock);
@@ -241,8 +245,8 @@ ecore_shutdown(void)
_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);
eina_condition_free(&_thread_feedback_cond);