netstar pushed a commit to branch master.

http://git.enlightenment.org/core/enlightenment.git/commit/?id=fd4218793591f220e601e7129f01791757a784e1

commit fd4218793591f220e601e7129f01791757a784e1
Author: Alastair Poole <nets...@gmail.com>
Date:   Tue Sep 7 22:01:46 2021 +0100

    procstats: shutdown dont wait.
    
    Don't block.
---
 src/modules/procstats/e_mod_main.c | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/src/modules/procstats/e_mod_main.c 
b/src/modules/procstats/e_mod_main.c
index 9e547d9da..55faaad24 100644
--- a/src/modules/procstats/e_mod_main.c
+++ b/src/modules/procstats/e_mod_main.c
@@ -427,8 +427,13 @@ _proc_stats_thread(void *data, Ecore_Thread *thread)
      {
         Eina_List *procs = proc_info_all_children_get();
         ecore_thread_feedback(thread, procs);
-        usleep(1000000 * module->poll_interval);
-        // e_powersave_sleeper_sleep(module->sleeper, module->poll_interval, 
EINA_TRUE);
+        for (int i = 0; i < 8 * module->poll_interval; i++)
+          {
+             if (ecore_thread_check(thread))
+               return;
+             usleep(125000);
+             // e_powersave_sleeper_sleep(module->sleeper, 
module->poll_interval, EINA_TRUE);
+          }
      }
 }
 
@@ -468,7 +473,6 @@ e_modapi_shutdown(E_Module *m EINA_UNUSED)
    Proc_Stats_Module *module = _this_module;
 
    ecore_thread_cancel(module->thread);
-   ecore_thread_wait(module->thread, 0.2);
 
    //e_powersave_sleeper_free(module->sleeper);
 

-- 


Reply via email to