Defer expression

Logan Smyth loganfsmyth at gmail.com
Wed Aug 16 20:44:10 UTC 2017


`Promise.try` calls its callback synchronously like `new Promise` does, so
it would not be a substitute for this case.

On Wed, Aug 16, 2017 at 1:29 PM, Darien Valentine <valentinium at gmail.com>
wrote:

> Deferring can mean different things, but generally `then` covers this well
> (specifically, pushing execution of something to the end of the current
> task).
>
>     Promise.resolve().then(stuffToDefer);
>
> I think there is a proposal for `Promise.try(stuffToDefer)`, which would
> eliminate the need for the `resolve` bit.
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170816/6c0cb7d6/attachment.html>


More information about the es-discuss mailing list