On Thu, Sep 29, 2016 at 12:57 PM, Felipe Magno de Almeida
<felipe.m.alme...@gmail.com> wrote:
> On Thu, Sep 29, 2016 at 12:38 PM, Davide Andreoli
> <d...@gurumeditation.it> wrote:
>> I'm starting this new thread to further discuss promises, thus the tag
>> [YetAnotherPromiseThread] :)
>
> [snip]
>
>> The topic here is: do we really want to allow instant resolution of
>> promises?
>> For "instant resolution" I mean a promise that will call the user callbacks
>> as soon as the callbacks are "connected", thus in the middle of the user
>> code. (we took as an example a cached promise value)
>
> I think the fulfillment must happen immediatelly and the user
> of the promise must be able to value_set/fail immediatelly.
> However, as raster has mentioned some place else, the callback
> call could be delayed to the next event loop idler or job, so
> the callback is not called directly from efl_promise_then.
>
> I'm not sure what cedric has implemented, but both cases are valid
> IMO. However, calling from the next event loop job/idler is a lot
> easier to reason about it, so I'm inclined to like it better.

BTW, this is how one of the first implementations of Eina_Promise did.
We later decided to remove the dependency of loop from Eina_Promises,
so this delayed callback call was not possible anymore.

> [snip]
>
> Regards,
> --
> Felipe Magno de Almeida



-- 
Felipe Magno de Almeida

------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to