Lucian Wischik: Async Compiler - Bug Fixes, Updates and Core Improvements

Play Lucian Wischik: Async Compiler - Bug Fixes, Updates and Core Improvements
Sign in to queue


Lucian Wischik is an engineer who spends a great deal of his time making Async magic happen in the C# and VB compilers. With the recent release of Visual Studio Async CTP SP1 Refresh, come several low-level improvements in how asynchrony is orchestrated by the compiler infrastructure. Many bug fixes and improvements in the core Async technology have been orchestrated by Lucian. What's new at the compiler level? What are the improvements and how do they manifest themselves to programmers? As you learned from Stephen Toub, making your own awaitable types is easier in this release. In this episode of Going Deep, Lucian drills down even deeper to show you exactly why, and covers a lot of ground. So pay attention! Tune in. Enjoy.

PS: One of these days, I will pronounce Lucian's last name correctly. I promise.

Get the bits. Write code:

Details and Download Page:

Forum for Feedback and Questions:




Download this episode

The Discussion

  • User profile image

    good stuff Smiley any chance you'll be talking about release schedule anytime soon? .net 4.5 maybe? Wink

  • User profile image

    very detailed report, nice stuff. happy to see such kind of transparency from large company like Microsoft.

    It seems like Async has a huge impact on the language spec, the languages is getting really complicated. no wonders many think we need languages designed with this in mind from the very beginning.

  • User profile image

    @felix9: Lucian is as detailed oriented as you can get! I want to get him on C9 more often. It's important to note that Lucian implemented much of the compiler changes himself! He's a rock star.


  • User profile image

    @Charles: When a programmer becomes one of the greats, they only need one name.

    Erik (Meijer), Anders (Hejlsberg), Dijkstra, Lucian (Wischik)

    Charles (Torre)

  • User profile image

    @AdamSpeight2008: Smiley Though you can certainly remove my name from that list!!! I just talk about programming these days.... I used to be a competent programmer, but the days of Charles cranking code seem to be mostly over (well, who knows what the future holds....). Funny that my name would appear in a list like yours! Smiley Charles, Dijkstra, Meijer, Lucian!!! LOL.

    Thanks for the kind thoughts,

  • User profile image

    @Charles: you may not be cranking out code but you're just as well known as the other guys Smiley

    not to mention a whole lot fewer people would even know about anders, erik and the others if it wasnt for you and the rest of channel9

  • User profile image

    Async integrated into PLINQ sounds like it would be pretty fun to implement and overly powerful in use Smiley

    Lucien also does pretty well at being able to speak to "us" through you+camera with you as a catalyst with questions.

    Anders/Mads arent so fun to talk to recently since they are only about high level features, or a sneek peak into what is in the works which is ok but not my cup of tea, unless they gave funny corner-case code samples on the whiteboard. So personally I love the nitty-gritty details of this sort from who implemented and designed the compiler code rewriting/restructuring techniques just before code generation.

  • User profile image

    Lucian (as noted by himself) munged C# style generics into his example.

    So what would it take to allow this style to be legal in (whilst preserving the style).

    For example via an attribute. 


    Public Function GetLength<T>(ByVal obj As T) As Integer
      Return obj.ToString.Length
    End Function 
    Public Sub Example()
    Dim x = (obj)=>obj.ToString.Length
    End Sub

  • User profile image

    Just FYI, I've tried three times now to download and play this content through the Zune desktop software. Each time I try to play it, it gets about 20 seconds in and then drops out with an error message about the file being "corrupt or not valid".

    I'm currently downloading the WMV version directly from the site, which I assume will work.

  • User profile image

    @dpratt71: Strange. Please let us know.


  • User profile image

    Async integrated into PLINQ?
    Async in linq+plinq+rx feels at first like it would be great. But let's think through some examples...

    string[] urls = new[] {"htp://", "htp://"}
    IAsyncEnumerable<string>[] values =
                  async from url in urls
                  select await new WebClient().DownloadStringTaskAsync(url);

    Note: we're not planning to ship IAsyncEnumerable<T>. But you could easily write it yourself. It would involve the signature "async Task<bool> MoveNextAsync() {...}". Also we're not planning on "async linq". I wrote this example just as a strawman.


    Anyway, this example is a bad use of async! Look what it would translate into:

    values = urls.SelectAsync(async (url) => await wc.DownloadStringTaskAsync(url) );

    which is identical to this more efficient version:

    values = urls.Select( (url) => wc.DownloadStringTaskAsync(url) );


    The "await" operator unwrapped the Task<string> that came out of DownloadStringTaskAsync into just a string, and then the "async" modifier morally wrapped it right back up into a Task<>.


    Let's also be clear that async will always involve some overhead. It's nice to think of LINQ expressions operating over large sets of data, i.e. precisely the places where we don't want this overhead.


    There seem to be other places where plinq+rx uses of async would be useful, but without going to the level of integrating async into linq expressions...

  • User profile image

    @AdamSpeight2008: I do prefer the C# syntax for generics when writing on whiteboards! And we're often asked for C# syntax for array indices, e.g. here:

    But having TWO different syntaxes in VB to write exactly the same thing? I'm sorry but I really don't like that!



  • User profile image

    I have some small CS bacground, so I know that this stuff is extremely hard but still it is strange that MS didn't catch the finally bug in internal testing. I mean it is huge. And return; bug -ouch I think that like 30+% of the CS students would catch that.

Add Your 2 Cents