Does async/await solve a real problem?

C. Scott Ananian ecmascript at cscott.net
Thu Sep 11 13:48:03 PDT 2014


On Thu, Sep 11, 2014 at 4:41 PM, Bruno Jouhier <bjouhier at gmail.com> wrote:
> I think that Mark Miller nails it really well:
>>
>> The cost of making atomicity cheap is that interleaving points must be
>> made explicit. With callbacks, this cost is quite high. Promises reduce this
>> cost substantially. async/await further reduces this cost about as far as it
>> can be reduced, while still leaving an explicit marker.
>
> IMO promises are only a step forwards; async/await is a leap forwards.

And, at the risk of banging my own drum -- async/await pave the way
for some really interesting work with optimistic transactional locking
and speculative execution, since they are (as noted in this thread)
explicit markers of atomicity boundaries.
 --scott


More information about the es-discuss mailing list