In the previous "What's New for Parallelism in Visual Studio 2012 RC" blog post, I mentioned briefly that for the .NET 4.5 Release Candidate, StreamReader.ReadLineAsync experienced a significant performance improvement over Beta. There's an intriguing story behind that, one I thought I'd share here.It has to do with some interesting...
In September, I blogged about what was new for parallelism and asynchrony in the Visual Studio 2012 Developer Preview, and in February I followed that up with a post on what was new in the Beta. Now that Visual Studio 2012 Release Candidate is out, I want to share a few thoughts on what’s new in the Release Candidate.Most new ...
Since .NET 4’s release, I’ve received several questions about a peculiar behavior of ConcurrentQueue<T> having to do with memory management.With Queue<T>, List<T>, and other such data structures in the .NET Framework, when you remove an element from the collection, the collection internally wipes out its reference...
We’re happy to announce that you can now download an Async Targeting Pack for Visual Studio 11 that lets you target .NET 4 and Silverlight 5. The included DLLs address the previously discussed issue of the Visual Studio 11 Beta compilers being incompatible with the AsyncCtpLibrary* DLLs from the Async CTP; with this targeting pack...
In a previous post Should I expose asynchronous wrappers for synchronous methods?, I discussed “async over sync,” the notion of using synchronous functionality asynchronously and the benefits that doing so may or may not yield. The other direction of “sync over async” is also interesting to explore.
Avoid Exposing ...
From time to time, I receive questions from developers which highlight either a need for more information about the new “async” and “await” keywords in C# and Visual Basic. I’ve been cataloguing these questions, and I thought I’d take this opportunity to share my answers to them.Conceptual Overviewhttps://...
Developers familiar with parallel programming are also familiar with a wide range of potential problems that can occur when practicing the art. One of the most well-known issues is “deadlock,” where two or more operations are waiting on each other to complete in a manner such that none of them will be able to complete.I&rsquo...
In .NET 4.5 Beta, the Stream class provides multiple virtual methods related to reading and writing: As a developer deriving from Stream, it’s helpful to understand what the base implementations do and when you can and should override them.Read, Write, FlushThe Read, Write, and Flush methods are the core synchronous ...
I get this question a lot: “Task implements IDisposable and exposes a Dispose method. Does that mean I should dispose of all of my tasks?” SummaryHere’s my short answer to this question: “No. Don’t bother disposing of your tasks.”Here’s my medium-length answer: “No. Don&...