lorddrew pushed a commit to branch master.

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

commit ea66c8302a20b268cf67230c5d237773e4c6697d
Author: Andrii Kroitor <an.kroi...@samsung.com>
Date:   Tue Dec 27 15:52:30 2016 +0200

    ecore_main: don't wait on marked to delete handlers on Windows
    
    This could lead to greedy wait with 100% CPU consumption because on wait
    error we never reach actual handlers deletion.
---
 src/lib/ecore/ecore_main.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/lib/ecore/ecore_main.c b/src/lib/ecore/ecore_main.c
index 91bff0e..9b8f9f9 100644
--- a/src/lib/ecore/ecore_main.c
+++ b/src/lib/ecore/ecore_main.c
@@ -2598,6 +2598,9 @@ _ecore_main_win32_select(int             nfds EINA_UNUSED,
    /* Create an event object per socket */
    EINA_INLIST_FOREACH(fd_handlers, fdh)
      {
+        if (fdh->delete_me)
+          continue;
+
         WSAEVENT event;
         long network_event;
 
@@ -2632,6 +2635,9 @@ _ecore_main_win32_select(int             nfds EINA_UNUSED,
    /* store the HANDLEs in the objects to wait for */
    EINA_INLIST_FOREACH(win32_handlers, wh)
      {
+        if (wh->delete_me)
+          continue;
+
         if (wh->h == stdin_handle)
           {
              if (stdin_wait_thread == INVALID_HANDLE_VALUE)

-- 


Reply via email to