cedric pushed a commit to branch master.
http://git.enlightenment.org/core/efl.git/commit/?id=18cbdad446037a9afdc1259c06b4190a71dc3b7d
commit 18cbdad446037a9afdc1259c06b4190a71dc3b7d
Author: Vincent Torri <vincent dot torri at gmail dot com>
Date: Wed Oct 7 05:54:41 2015 +0200
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 <[email protected]>
---
src/lib/ecore/ecore_exe_win32.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/lib/ecore/ecore_exe_win32.c b/src/lib/ecore/ecore_exe_win32.c
index d488d5a..04326b0 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;
--