Promises, async functions, and requestAnimationFrame

Benjamin Gruenbaum benjamingr at gmail.com
Sun Apr 24 08:51:00 UTC 2016


Note that there is no guarantee that the `then` handlers (after the await)
will fire in the same loop since they defer execution on their own and
might defer it further.

In practice I assume they'll probe to see if they need to actually schedule
asynchronously or the constructed promise is already handling that (like
libraries do) and won't defer it any further but that's just a guess.

The only spec I'm aware of that does not defer in this case is the
es-observable spec.

There has also been talk about being able to set the scheduler for promises
which is something I wanted to bring up in ESDiscuss but haven't been able
to yet.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160424/9decabe4/attachment.html>


More information about the es-discuss mailing list