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. Cedric > why? > > -- > ------------- 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 > ------------------------------------------------------------------------------ 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