On Sun, 11 Mar 2018 21:37:33 +0000 Gustavo Sverzut Barbieri
<barbi...@gmail.com> said:

> No time soon, not even an Efl dev env atm.
> 
> But it’s what I wrote: move to pd->promise, resolve only from waitpid()
> result/event. Promise cancel = call task end.
> 
> Btw, why task end instead of the invalidate()?

because the object is not invalid yet. end requests the other end to exit. if
it's a thread you have to wait for that to happen. thread may send
results/responses before exiting and you want to collect them. if it's an exe -
same thing - it's a nice co-operative SIGINT, so process gets a chance to trap,
clean-up and respond. it's not an invalidated object.

see my other email response. i think you missed some key points. :)

> Em dom, 11 de mar de 2018 às 17:08, Vincent Torri <vincent.to...@gmail.com>
> escreveu:
> 
> > On Sun, Mar 11, 2018 at 8:51 PM, Gustavo Sverzut Barbieri
> > <barbi...@gmail.com> wrote:
> > > On Sat, Mar 10, 2018 at 8:04 AM, Carsten Haitzler <ras...@rasterman.com>
> > wrote:
> > >> raster pushed a commit to branch master.
> > >>
> > >>
> > http://git.enlightenment.org/core/efl.git/commit/?id=965f257e70b2766b41df57c6ead59d422b632062
> > >>
> > >> commit 965f257e70b2766b41df57c6ead59d422b632062
> > >> Author: Carsten Haitzler (Rasterman) <ras...@rasterman.com>
> > >> Date:   Sat Mar 10 20:02:09 2018 +0900
> > >>
> > >>     ecore - efl exe/thread - only allow run once ever
> > >> ---
> > >>  src/lib/ecore/efl_exe.c    | 5 ++++-
> > >>  src/lib/ecore/efl_thread.c | 3 +++
> > >>  2 files changed, 7 insertions(+), 1 deletion(-)
> > >>
> > >> diff --git a/src/lib/ecore/efl_exe.c b/src/lib/ecore/efl_exe.c
> > >> index 4ef0aee967..273b97532e 100644
> > >> --- a/src/lib/ecore/efl_exe.c
> > >> +++ b/src/lib/ecore/efl_exe.c
> > >> @@ -61,6 +61,7 @@ struct _Efl_Exe_Data
> > >>     } fd;
> > >>  #endif
> > >>     Eina_Bool exit_called : 1;
> > >> +   Eina_Bool run : 1;
> > >>  };
> > >
> > > if you used pd->promise here, there is no need to keep that flag.
> > >
> > > I'm not sure why you're trying to co-exist promise with-no-promise for
> > > this API, this will just add confusion and code to maintain. Here
> > > you're adding one more method, one more event, etc... :-(
> >
> > Gustavo: Maybe you could quickly provide a patch to show how to code
> > this more correctly
> >
> > Vincent
> >
> >
> > ------------------------------------------------------------------------------
> > Check out the vibrant tech community on one of the world's most
> > engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> > _______________________________________________
> > enlightenment-devel mailing list
> > enlightenment-devel@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
> >
> -- 
> Gustavo Sverzut Barbieri
> --------------------------------------
> Mobile: +55 (16) 99354-9890
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> 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" --------------
Carsten Haitzler - ras...@rasterman.com


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to