On Sun, Jun 26, 2016 at 3:49 PM, Michal Suchanek <hramr...@gmail.com> wrote: >
Hello Michal, > On 25 June 2016 at 16:38, Felipe Magno de Almeida > <felipe.m.alme...@gmail.com> wrote: >> Well, the object nomenclature is a little misleading IMO. For C++ at least >> everything is an object, even ints. ... > > no, not ints :) Yes.. It is. Look at the last draft (this is true since C++98, but the last draft is obviously easier to reference) at 1.8 paragraph 1. [snip] >> I actually like the idea of using events for progress, because it is an >> event, >> it has all the properties of events. However, it just has one single problem, >> which is the race condition of progress being available and when the event >> is registered. This problem also existed with Eina_Promise however, and >> we fixed by adding strict_promise concept which would only send progress >> when a progress callback was registered. This could be case for Eo as well, >> but we need to be able to differentiate, because a strict_promise can lead >> to deadlock if the user never registers any progress callback. > > What's the strict progress good for? > > Just cache one progress event until a progress callback is registered > or the promise is deleted. If new progress event is sent it is cached > and the old one deleted. That way when the progress callback is > registered it has latest progress information. I have considered that option. However, this creates overhead even for asynchronous operations which progress is not really that relevant. And we start requiring a free function for progress data, etc. The way it is right now, the caller is responsible for freeing and promises don't have to know how to do that, if we cache, this no longer is true and we have to deal with moveability, copyability etc. > Thanks > > Michal Regards, -- Felipe Magno de Almeida ------------------------------------------------------------------------------ Attend Shape: An AT&T Tech Expo July 15-16. Meet us at AT&T Park in San Francisco, CA to explore cutting-edge tech and listen to tech luminaries present their vision of the future. This family event has something for everyone, including kids. Get more information and register today. http://sdm.link/attshape _______________________________________________ enlightenment-devel mailing list enlightenment-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/enlightenment-devel