summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
parent2c9848aa7e1a841dc10dff35c43b26423c67a7de (diff)
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>
Diffstat (limited to 'src/lib')
-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)
120 if (exe->close_threads) 120 if (exe->close_threads)
121 break; 121 break;
122 122
123 Sleep(100);
123 continue; 124 continue;
124 } 125 }
125 126
@@ -189,6 +190,7 @@ _ecore_exe_pipe_error_thread_cb(void *data)
189 if (exe->close_threads) 190 if (exe->close_threads)
190 break; 191 break;
191 192
193 Sleep(100);
192 continue; 194 continue;
193 } 195 }
194 196
@@ -393,7 +395,7 @@ _impl_ecore_exe_eo_base_finalize(Eo *obj, Ecore_Exe_Data *exe)
393 395
394 flags = exe->flags; 396 flags = exe->flags;
395 397
396 DBG("Creating process %s", exe->cmd); 398 DBG("Creating process %s with flags %d", exe->cmd, flags);
397 399
398 if (!exe->cmd) goto error; 400 if (!exe->cmd) goto error;
399 401