summaryrefslogtreecommitdiff
path: root/src/lib/ecore/efl_loop.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/ecore/efl_loop.c')
-rw-r--r--src/lib/ecore/efl_loop.c22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/lib/ecore/efl_loop.c b/src/lib/ecore/efl_loop.c
index e40dbef..726a4b3 100644
--- a/src/lib/ecore/efl_loop.c
+++ b/src/lib/ecore/efl_loop.c
@@ -621,6 +621,14 @@ _efl_loop_message_process(Eo *obj, Efl_Loop_Data *pd)
621 } 621 }
622 else free(msg); 622 else free(msg);
623 } 623 }
624
625 while (pd->message_pending_queue)
626 {
627 msg = (Message *)pd->message_pending_queue;
628 pd->message_pending_queue = eina_inlist_remove(pd->message_pending_queue,
629 pd->message_pending_queue);
630 pd->message_queue = eina_inlist_append(pd->message_queue, EINA_INLIST_GET(msg));
631 }
624 } 632 }
625 return EINA_TRUE; 633 return EINA_TRUE;
626} 634}
@@ -655,6 +663,10 @@ _efl_loop_efl_task_end(Eo *obj, Efl_Loop_Data *pd EINA_UNUSED)
655 efl_loop_quit(obj, eina_value_int_init(0)); 663 efl_loop_quit(obj, eina_value_int_init(0));
656} 664}
657 665
666EFL_SCHEDULER_ARRAY_DEFINE(loop_scheduler,
667 EFL_LOOP_EVENT_IDLE_ENTER,
668 EFL_LOOP_EVENT_IDLE);
669
658EAPI Eina_Future_Scheduler * 670EAPI Eina_Future_Scheduler *
659efl_loop_future_scheduler_get(const Eo *obj) 671efl_loop_future_scheduler_get(const Eo *obj)
660{ 672{
@@ -667,15 +679,7 @@ efl_loop_future_scheduler_get(const Eo *obj)
667 Efl_Loop_Data *pd = efl_data_scope_get(obj, EFL_LOOP_CLASS); 679 Efl_Loop_Data *pd = efl_data_scope_get(obj, EFL_LOOP_CLASS);
668 680
669 if (!pd) return NULL; 681 if (!pd) return NULL;
670 if (!pd->future_scheduler.loop) 682 return efl_event_future_scheduler_get(obj, loop_scheduler());
671 {
672 Eina_Future_Scheduler *sched =
673 _ecore_event_future_scheduler_get();
674 pd->future_scheduler.eina_future_scheduler = *sched;
675 pd->future_scheduler.loop = obj;
676 pd->future_scheduler.loop_data = pd;
677 }
678 return &(pd->future_scheduler.eina_future_scheduler);
679 } 683 }
680 if (efl_isa(obj, EFL_LOOP_CONSUMER_CLASS)) 684 if (efl_isa(obj, EFL_LOOP_CONSUMER_CLASS))
681 return efl_loop_future_scheduler_get(efl_loop_get(obj)); 685 return efl_loop_future_scheduler_get(efl_loop_get(obj));