Eduasync 20: Changes between the VS11 Preview and the Visual Studio 11 Beta

A while I ago I blogged about what had changed under the hood of async between the CTP and the VS11 Preview. Well, now that the VS11 Beta is out, it’s time to do it all again… Note that the code in this post is in the Eduasync codebase, under a different solution (Eduasync VS11.sln). … Continue reading Eduasync 20: Changes between the VS11 Preview and the Visual Studio 11 Beta

Eduasync part 19: ordering by completion, ahead of time…

Today’s post involves the MagicOrdering project in source control (project 28). When I wrote part 16 of Eduasync, showing composition in the form of majority voting, one reader mailed me a really interesting suggestion. We don’t really need to wait for any of the tasks to complete on each iteration of the loop – we … Continue reading Eduasync part 19: ordering by completion, ahead of time…

Eduasync part 18: Changes between the Async CTP and the Visual Studio 11 Preview

In preparation for CodeMash, I’ve been writing some more async code and decompiling it with Reflector. This time I’m using the Visual Studio 11 Developer Preview – the version which installs alongside Visual Studio 2010 under Windows 7. (Don’t ask me about any other features of Visual Studio 11 – I haven’t explored it thoroughly; … Continue reading Eduasync part 18: Changes between the Async CTP and the Visual Studio 11 Preview

Eduasync part 16: Example of composition: majority voting

Note: For the rest of this series, I’ll be veering away from the original purpose of the project (investigating what the compiler is up to) in favour of discussing the feature itself. As such, I’ve added a requirement for AsyncCtpLib.dll – but due to potential distribution restrictions, I’ve felt it safest not to include that … Continue reading Eduasync part 16: Example of composition: majority voting

Eduasync part 13: first look at coroutines with async

(This part covers project 18 in the source code.) As I mentioned in earlier parts, the "awaiting" part of async methods is in no way limited to tasks. So long as we have a suitable GetAwaiter() method which returns a value of a type which in turn has suitable methods on it, the compiler doesn’t … Continue reading Eduasync part 13: first look at coroutines with async

Eduasync part 12: Observing all exceptions

(This post covers projects 16 and 17 in the source code.) Last time we looked at unwrapping an AggregateException when we await a result. While there are potentially other interesting things we could look at with respect to exceptions (particularly around cancellation) I’m just going to touch on one extra twist that the async CTP … Continue reading Eduasync part 12: Observing all exceptions

Eduasync part 11: More sophisticated (but lossy) exception handling

(This post covers projects 13-15 in the source code.) Long-time readers of this blog may not learn much from this post – it’s mostly going over what I’ve covered before. Still, it’s new to Eduasync. Why isn’t my exception being caught properly? Exceptions are inherently problematic in C# 5. There are two conflicting aspects: The … Continue reading Eduasync part 11: More sophisticated (but lossy) exception handling