Commit Graph

22 Commits

Author SHA1 Message Date
Carsten Haitzler 1c74aaa7e9 Revert "cxx: Fix manual code after efl_app change."
This reverts commit 135154303b.

Revert "efl: move signal events from efl.loop to efl.app"
This reverts commit 3dbca39f98.

Revert "efl: add test suite for efl_app"
This reverts commit 3e94be5d73.

Revert "efl: create Efl.App class, the parent of Efl.Loop"
This reverts commit 28fe00b94e.

Go back to before efl.app because I think this should be done with
superclassing here not a parent object. reasons?

1. multiple loops per single thread make no sense. so if multilpe loop
objects they wont be contained in a single app object and then deleted
like this.
2. the app object is not really sharable in this design so it cant be
accessed from other threads
3. it makes it harder to get the main loop or app object (well 2 func
calls one calling the other and more typing. it is longer to type and
more work where it is not necessary, and again it can't work from
other threads unless we go duplicating efl.app per thread and then
what is the point of splittyign out the signal events from efl.loop
then?)

etc.
2018-03-03 13:40:33 +09:00
Mike Blumenkrantz 28fe00b94e efl: create Efl.App class, the parent of Efl.Loop 2018-02-26 14:02:51 -05:00
Myoungwoon Roy, Kim b203ff1878 ecore_event: Fix a break of consistency of return data
Summary:
This patch fixes a break of consistency of return data from ecore_event_del.
Before EFL 1.20, when calling ecore_event_add(ECORE_EVENT_SIGNAL_USER, event_data, NULL, &data);
The user data(data) is saved at event->data. and when user calls ecore_event_del(event_handler),
ecore_event_del returns event->data. However, current ecore_event_del returns pd->ev.
I think it is ABI break.

Test Plan: Execute test suite

Reviewers: cedric, raster, stefan_schmidt, Jaehyun_Cho

Reviewed By: Jaehyun_Cho

Differential Revision: https://phab.enlightenment.org/D5786
2018-02-07 13:50:24 +09:00
Myoungwoon Roy, Kim 211093b7c5 ecore_event: Check for the valid type
Summary:
This patch checks for the valid types.
As mentioned API reference documentation, user must know its type before hand.
The type should be chedked like previous efl version and ecore_event_type_flush_internal()

Test Plan: Execute a ecore test suite.

Reviewers: cedric, raster, jpeg, stefan_schmidt, Jaehyun_Cho

Subscribers: cedric

Differential Revision: https://phab.enlightenment.org/D5776
2018-01-31 18:55:40 +09:00
Mike Blumenkrantz da9eef6027 ecore: add function for prepending an event handler
@feature
2018-01-30 13:02:07 -05:00
Carsten Haitzler b27ca559f6 remove elgacy ecore event usage in futures that limit to mainloop only
also eina_procmis was not threadsafe so cannto use loops in different
threads at all until this was made safe. needed to disable the old
ecore_event using code in for ecore futures and create a new efl loop
message future and handler instead ... but now a quick experiment with
multiple loops in 10 threads plus mainloop have timers at least work.
i need to test more like fd handlers etc etc. but it's a step.
2017-12-28 02:24:12 +09:00
Jean-Philippe Andre 147ef4f91d ecore: Avoid access to invalid eo id
Not a fan of the solution, as I think some of the logic handling those
futures is a bit broken. I'm not 100% sure about this patch. But this
improves make check with CK_FORK=no in elm_suite.
2017-12-18 19:54:31 +09:00
Andy Williams a34aca27a0 ecore: Additional safety for bad futures
Fixes T6519
2017-12-17 14:38:19 +00:00
Carsten Haitzler 5dd52fd09b ecore - begin moving data into the efl loop data in the object
we really should have data inside the loop object, so begin moving it
one small thing at a time. this is the basics that will allow multiple
efl loops. make an eo efl object and class for fd handlers that is efl loop
bound make fd handlers really bound to their parent loop and not global  as
well as have a nice class/obj. create an message queue per loop and
put legacy ecore events on top of it... and a lot more.

this is not 100% done, but it's a lot of the core and groundwork.
various ecore_timer_add(), ecore_diler_add() etc. need changes.

The following still need doing:

  ecore_timer (internal usage for sure)
  ecore_idler (internal usage for sure)
  ecore_idle_enterer
  ecore_idle_exiter
  ecore_pollers? (is the new efl loop stuff ok?)
  ecore_exe (fork/spawn from any thread and track exe from that thread?)
  ecore_signal code
  ecore_throttle (should we have a single global too? we have per loop)
  ecore_app ? (should every loop be given its own argv/argc?)

Lots of internal ecore code uses/calls these legacy calls and we
should have efl loop replacements and/or use the ones we have

The following will bedifferently designed for loop to loop
control/messaging/ipc:

  ecore_thread
  ecore_pipe
2017-12-15 14:16:53 +09:00
Guilherme Iscaro 5bd8c9a78d Eina: Add Eina_Promise/Eina_Future.
This commit adds a new promise/future API which aims to replace
efl_future.
2017-09-04 10:24:00 -03:00
WooHyun Jung 9ef214ec08 ecore_events: inarray should be flushed before return
@fix
2017-07-26 18:57:37 +09:00
Jean-Philippe Andre d14b6e3f84 ecore: Fix memory leak and logic
@cedric... how could this even happen??
2017-03-14 22:38:43 +09:00
Cedric BAIL 614c255f3b ecore: add ecore_event_type_flush.
During shutdown it is possible that some event are still in ecore events
queue and get processed after the shutdown of the module that did emit them.
This would lead to crash in some case. The answer to this problem is to
normally manually track all ecore event in the queue and destroy them
before shutdown... Of course that make the API difficult to use and
basically nobody got it right.

This new API do actually as it says remove all the ecore event of a
certain type from ecore events queue. It is to be called on shutdown.

@fix
2017-03-09 16:17:58 -08:00
Mike Blumenkrantz e263cbf9d0 Revert "ecore: forcefully flush pending event when ecore_shutdown is called."
This reverts commit 2c6808e4ee.

this breaks a number of expectations and guarantees in efl:

* causes unexpected event iteration during app startup before main loop begins
  - leads to event loss
* causes unexpected event iteration during app shutdown after main loop quits
  - leads to invalid memory access
* causes recursive event iteration during event handler callbacks
  - leads to ?????????????????????????????????????????????????????????????????

all of these can be easily seen by running enlightenment, and all of these cause
unexpected behaviors in enlightenment including, but not limited to, a lot of crashes

fix T5232
2017-03-03 11:56:04 -05:00
Cedric BAIL 2c6808e4ee ecore: forcefully flush pending event when ecore_shutdown is called.
If a component emit Ecore_Event and they aren't processed before the
call it call ecore_shutdown, there is no way to prevent this event
from being triggered after the component at shutdown itself. Which
may well lead to a use after free case. As we don't know which event
are pending and we also are not shuting down ecore completely as they
are still other component using it, we can only flush all pending event
right away.
2017-02-27 15:05:35 -08:00
Jean Guyomarc'h 334d32a575 ecore: don't use an unspecified amount of arguments 2016-05-06 22:18:57 +02:00
Cedric BAIL 8cc6c7561a ecore: remove useless ecore_lock/unlock. 2016-02-02 10:45:42 -08:00
Carsten Haitzler 2aeb289063 eina - begin event log infra we can get from the new debug monitor
we can down dump event logs. some ecore mainloop bits are logging at
the moment.
2015-05-10 19:05:54 +09:00
ChunEon Park 28871750b7 Revert "ecore/ecore_event - logically this check is redundant."
This reverts commit df60e63bf9.

seems this patch is wrong.
2014-05-27 22:27:05 +09:00
ChunEon Park df60e63bf9 ecore/ecore_event - logically this check is redundant.
remove check so that prevent tool doens't notify this anymore.
2014-05-27 20:36:42 +09:00
Mike Blumenkrantz b2de05f49a all efl object deletion functions now take NULL without crashing or erroring
SVN revision: 81667
2012-12-24 09:35:56 +00:00
Vincent Torri 7d6010b12c merge: add escape ecore, fix several bugs
SVN revision: 79995
2012-12-02 22:35:45 +00:00