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>
This commit is contained in:
Vincent Torri 2015-10-07 05:54:41 +02:00 committed by Cedric BAIL
parent 2c9848aa7e
commit 18cbdad446
1 changed files with 3 additions and 1 deletions

View File

@ -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;