Commit Graph

30 Commits

Author SHA1 Message Date
Jean-Philippe Andre fed8123448 ecore: Avoid double free with promises 2017-12-18 19:54:31 +09: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
Cedric BAIL 3c62a5fab8 ecore: properly cleanup callbacks of future/promise. 2017-07-11 11:02:47 -07:00
Stefan Schmidt f406bae8b7 ecore: efl_promise: remove superfluous NULL check
f is already checked against NULL in the eina array macro. No need to check
again.

CID: 1362730
2017-04-26 15:12:53 +02:00
Cedric BAIL 637073813b ecore: add helper to automatically connect a future result to a promise.
This helper is to be used likely with next and an external request.
2016-12-16 14:10:58 -08:00
Cedric BAIL ca1762be21 ecore: delay promise fulfillment to next loop iteration. 2016-12-16 14:10:58 -08:00
Cedric BAIL 5882c30a98 ecore: refactor promise propagation code. 2016-12-16 10:19:37 -08:00
Gustavo Sverzut Barbieri 47ddca0f42 Efl_Future: class name (string) using "." for namespace.
Following recent eolian change, the string must have "." to split
namespace, not "_".
2016-12-12 02:30:33 -02:00
Cedric BAIL 832873259c ecore: fix efl_future_all/race to be setup on already fulfilled future. 2016-11-03 18:03:16 -07:00
Cedric BAIL 59a635d251 ecore: make call to future_get and value_set irrelevant as they should be. 2016-11-03 18:03:16 -07:00
Cedric Bail bfcc66e4eb ecore: allow multiple nested recursion of the same promise/future to happen at the same time. 2016-10-25 18:50:35 -07:00
Cedric Bail 919829aa7d ecore: properly handle promise failure when each member has not been fulfilled yet. 2016-10-25 15:35:13 -07:00
Cedric Bail 6321630d32 ecore: force fully resolve a future on cancel during recursive call. 2016-10-21 12:44:53 -07:00
Cedric BAIL fb1feee480 ecore: allow efl_future_cancel on a promise currently being resolved.
This is necessary for allowing proper handling of recursive cancel.
2016-10-19 13:39:10 -07:00
Cedric BAIL efda7d492d ecore: handle recursive trigger of promise by the cancel of a future.
This avoid double free/double callback call.
2016-10-18 16:49:48 -07:00
Tom Hacohen 65367a4a07 Ecore promise: Renamed shadow variable.
Please everyone, use -Wshadow and fix your damn wranings.
2016-09-26 14:50:45 +01:00
Gustavo Sverzut Barbieri f42e649476 efl_promise: check NULL before calling.
we do not check any of success, failure or progress, so we must check
if they are valid before calling.

This fixed a bug in efl_net_dialer_tcp where it uses a null failure
cb and was SEGV.
2016-09-19 01:18:14 -03:00
Cedric Bail f8fd97cd02 ecore: shut up const warning. 2016-09-15 21:49:08 -07:00
Cedric Bail b421414e55 ecore: do not trigger future,none once value/cancel has been set.
This would have forced who ever used future,none signal to manually
filter out event triggered by all the future beeing fullfiled and
disconnecting once they receive a value or are marked failed.
2016-09-15 21:49:08 -07:00
Cedric BAIL e8fb89c156 ecore: fix reference counting of promise value for efl_future_race and efl_future_all. 2016-09-09 16:22:55 -07:00
Tom Hacohen 284b6a5a3e Update the EFL according to new Eo API changes.
I didn't expect it (my bad), but why the hell is this done manually
instead of using Eolian?! People, use Eolian.
2016-09-09 11:25:12 +01:00
Cedric BAIL bd362b13d6 efl: add documentation and last cleanup of the API. 2016-09-08 15:16:43 -07:00
Cedric BAIL f1c8c82e5f ecore: fix parenting to be done right on promise and future. 2016-09-08 15:16:43 -07:00
Cedric BAIL cb17d46cf5 ecore: fix optional future promise to not complain of there destruction. 2016-09-08 15:16:42 -07:00
Cedric BAIL aaac15126b ecore: add efl_future_iterator_race. 2016-09-08 14:58:06 -07:00
Cedric Bail 0789156c86 ecore: add efl_future_race. 2016-09-08 14:58:06 -07:00
Cedric BAIL 56df83e2c0 ecore: add efl_future_iterator_all. 2016-09-08 14:58:06 -07:00
Cedric Bail 84958dc6ca ecore: add efl_future_all. 2016-09-08 14:58:05 -07:00
Cedric Bail cd6a8aa6b3 ecore: add support for optional futures. 2016-09-08 14:58:05 -07:00
Cedric BAIL b2fb5e375a ecore: add Efl.Promise. 2016-09-08 14:58:05 -07:00