Promise-returning delay function

Andrea Giammarchi andrea.giammarchi at gmail.com
Tue Oct 28 11:24:02 PDT 2014


I actually don't want Promises at all with network interactions but you
have to explain this to all developers out there that think Promises are
the Eldorado for everything asynchronous ... I found myself needing a
cancel mechanism that goes beyond your outer scoped flag.

I really need to **drop that action** ... not to wait for it to fulfill and
then do something else.

Imagine it's not about network, imagine it's "a lift" ... door are closing,
someone passes in the middle, what do you do now: sound the alert after
chopping the person that tried to enter in the meanwhile or change floor
... after chopping the person anyway ?

If promises could handle edge cases events too I think we could handle
above situation instead of chopping that poor person.

I hope you got what I mean but again this most likely need another thread.

Best Regards



On Tue, Oct 28, 2014 at 3:21 PM, C. Scott Ananian <ecmascript at cscott.net>
wrote:

> You probably want streams for typeahead, not promises.
>   --scott
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20141028/71e5a164/attachment-0001.html>


More information about the es-discuss mailing list