Hi guys,

I've just found a bug when you try to add a timer from inside an idler
that that is finishing. Attached is a test case that exemplifies the
error (in python, but the error appeared to me in C), and a patch to
fix it too. Please, could someone take a look at it?

Regards,
-- 
Rafael Antognolli
ProFUSION embedded systems
http://profusion.mobi
import ecore

def _timer_cb():
    print "bla"

def _idler_cb():
    t = ecore.timer_add(1, _timer_cb)

i = ecore.idler_add(_idler_cb)
ecore.main_loop_begin()
Index: src/lib/ecore/ecore_main.c
===================================================================
--- src/lib/ecore/ecore_main.c	(revision 40886)
+++ src/lib/ecore/ecore_main.c	(working copy)
@@ -545,8 +545,6 @@
         while (_ecore_timer_call(now));
 	_ecore_timer_cleanup();
      }
-   /* any timers re-added as a result of these are allowed to go */
-   _ecore_timer_enable_new();
    /* process signals into events .... */
    while (_ecore_signal_count_get()) _ecore_signal_call();
    if (_ecore_event_exist())
@@ -596,6 +594,8 @@
 	  _ecore_fps_debug_runtime_add(t2 - t1);
      }
    start_loop:
+   /* any timers re-added as a result of these are allowed to go */
+   _ecore_timer_enable_new();
    if (do_quit)
      {
 	in_main_loop--;
------------------------------------------------------------------------------
OpenSolaris 2009.06 is a cutting edge operating system for enterprises 
looking to deploy the next generation of Solaris that includes the latest 
innovations from Sun and the OpenSource community. Download a copy and 
enjoy capabilities such as Networking, Storage and Virtualization. 
Go to: http://p.sf.net/sfu/opensolaris-get
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to