summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Torri <vincent dot torri at gmail dot com>2015-10-07 05:54:41 +0200
committerCedric BAIL <cedric@osg.samsung.com>2015-10-12 17:21:59 -0700
commit18cbdad446037a9afdc1259c06b4190a71dc3b7d (patch)
tree1f4d49805b1c2b00c2fa20406752f25ff8521e82
parent2c9848aa7e1a841dc10dff35c43b26423c67a7de (diff)
downloadefl-18cbdad446037a9afdc1259c06b4190a71dc3b7d.tar.gz
ecore_exe: avoid thread doing nothing by adding a small sleep
This fixes the CPU to be usedat 100% for each thread in ecore_exe. This is obviously not an ideal fix and will be improved in the future. Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r--src/lib/ecore/ecore_exe_win32.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index d488d5a9b3..04326b0cdf 100644
--- a/src/lib/ecore/ecore_exe_win32.c
+++ b/src/lib/ecore/ecore_exe_win32.c
@@ -120,6 +120,7 @@ _ecore_exe_pipe_read_thread_cb(void *data)
if (exe->close_threads)
break;
+ Sleep(100);
continue;
}
@@ -189,6 +190,7 @@ _ecore_exe_pipe_error_thread_cb(void *data)
if (exe->close_threads)
break;
+ Sleep(100);
continue;
}
@@ -393,7 +395,7 @@ _impl_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
flags = exe->flags;
- DBG("Creating process %s", exe->cmd);
+ DBG("Creating process %s with flags %d", exe->cmd, flags);
if (!exe->cmd) goto error;