Entries:
Comments:
Discussions:

Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

Async Functions in JavaScript with Etienne Baudoux

18 minutes, 30 seconds

Download

Right click “Save as…”

In this video Etienne describes the implementation of the Async Function specification for the Microsoft Edge browser. It is a fascinating look at how the Edge browser combines both parsing and native C++ calls to implement this incredibly important pattern. Although much of what is described can already be done with today's JavaScript, the new language feature simplifies the actual code we have to write while ensuring correct behavior. This particular implementation has the added bonus of using a native call to make execution even faster. 

Tags:

Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation
    Unsubscribing
    Subscribing
  • Harm MeijerHarm Meijer

    Native Promise in Chrome can have you throw errors to reject a promise.

    Throwing error in jQuery Deferred will not work but as far as I know other browsers implement this natively.

    Is Promise coming to IE or do programmers have to go to the "and now test for IE" phase again? Because at some point programmers will likely just skip this part.

  •  

    Nice video, but I do have some issues with the shown examples!

    1.

    async function doSomething(num)

    always returns a promise. The
    await
    in
    return await doSomething(--num)
    doesn't change a thing. Returning the promise outright would work just as well.

    2. 

    async function httpGetJSON(url)
    has the same issue. Plus it doesn't do any JSON parsing! :)

Remove this comment

Remove this thread

Close

Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.