On Tue, 31 May 2016 11:48:32 -0300 Felipe Magno de Almeida
<felipe.m.alme...@gmail.com> said:

> On Tue, May 31, 2016 at 10:15 AM, Cedric BAIL <cedric.b...@free.fr> wrote:
> > On May 30, 2016 22:51, "Carsten Haitzler" <ras...@rasterman.com> wrote:
> >>
> >> the api for promises seems pretty confusing. just look at this:
> >>
> >>   job = efl_loop_job(obj, args);
> >>    eina_promise_then(job, _efl_loop_args_job_cb, NULL, args);
> >>
> >> why do i need to pass in args... TWICE? well ok - this specific way of
> > using
> >> promises for jobs... both promises in efl_loop.eo do this, and it's
> > confusing.
> >> the void *data when creating the job (first args) is not used at all. the
> > data
> >> for the promise is passed as data to the promise callback.
> >>
> >> why do this? value isn't used here in the promise -actually it's the
> > promise
> >> ptr itself for whatever reason.
> >
> > They are both different. A promise deliver a value at some point in the
> > future to multiple callback couple. The data you give when creating the
> > promise is the one delivered in the future. The one you pass with your
> > couple of callbacks is obviously tied to that couple of callback. They are
> > clearly 2 different things. Obviously you don't need to pass any data at
> > all in both case.
> 
> Though I think cedric's idea is a good one, because it reuses the
> eina promise value for something that could be useful, I think the
> use of void* in the eolian API is not good. I don't know how to
> resolve this conflict except by removing the void* and have
> the promise be of type promise<void> without any value.

the void * isn't even passed along from the eo api./ i sat down trying to
figure it out because it was basically impossible to know what was used where
from the docs.

> If there were "template" methods in Eolian this would be completely
> clean, but unfortunately we don't.
> 
> > Cedric
> >
> >> why?
> 
> Regards,
> -- 
> Felipe Magno de Almeida
> 
> ------------------------------------------------------------------------------
> What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
> patterns at an interface-level. Reveals which users, apps, and protocols are 
> consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
> J-Flow, sFlow and other flows. Make informed decisions using capacity 
> planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
> _______________________________________________
> enlightenment-devel mailing list
> enlightenment-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> 


-- 
------------- Codito, ergo sum - "I code, therefore I am" --------------
The Rasterman (Carsten Haitzler)    ras...@rasterman.com


------------------------------------------------------------------------------
What NetFlow Analyzer can do for you? Monitors network bandwidth and traffic
patterns at an interface-level. Reveals which users, apps, and protocols are 
consuming the most bandwidth. Provides multi-vendor support for NetFlow, 
J-Flow, sFlow and other flows. Make informed decisions using capacity 
planning reports. https://ad.doubleclick.net/ddm/clk/305295220;132659582;e
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to