netstar pushed a commit to branch master. http://git.enlightenment.org/apps/evisum.git/commit/?id=d2d19823d21e730ca64b2b6db75998386bdf41e4
commit d2d19823d21e730ca64b2b6db75998386bdf41e4 Author: Alastair Poole <nets...@gmail.com> Date: Mon Dec 28 23:05:58 2020 +0000 disk: update. --- src/bin/ui/ui_disk.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/src/bin/ui/ui_disk.c b/src/bin/ui/ui_disk.c index 95357f2..d951770 100644 --- a/src/bin/ui/ui_disk.c +++ b/src/bin/ui/ui_disk.c @@ -16,6 +16,7 @@ typedef struct Ecore_Thread *thread; int (*sort_cb)(const void *, const void *); Eina_Bool sort_reverse; + Eina_Bool skip_wait; Ui *ui; } Ui_Data; @@ -235,10 +236,20 @@ _item_disk_clicked_cb(void *data, Evas_Object *obj EINA_UNUSED, void *event_info static void _disks_poll(void *data, Ecore_Thread *thread) { + Ui_Data *pd = data; + while (!ecore_thread_check(thread)) { ecore_thread_feedback(thread, file_system_info_all_get()); - usleep(1000000); + for (int i = 0; i < 8; i++) + { + if (pd->skip_wait) + { + pd->skip_wait = 0; + break; + } + usleep(125000); + } } } @@ -273,9 +284,7 @@ _disks_poll_feedback_cb(void *data, Ecore_Thread *thread, void *msgdata) static void _disks_poll_update(Ui_Data *pd) { - Eina_List *mounted = file_system_info_all_get(); - - _disks_poll_feedback_cb(pd, NULL, mounted); + pd->skip_wait = 1; } static void --