Posts by this author

Sep 22, 2012
0
1

New TaskCreationOptions and TaskContinuationOptions in .NET 4.5

Astute users of the Task Parallel Library might have noticed three new options available across TaskCreationOptions and TaskContinuationOptions in .NET 4.5: DenyChildAttach, HideScheduler, and (on TaskContinuationOptions) LazyCancellation.  I wanted to take a few minutes to share more about what these are and why we added them....

Task Parallel Library.NET 4.NET 4.5
Sep 11, 2012
0
1

Forking in async methods

Given that .NET 4.5 has only recently been released in its final form, it’s not surprising that many folks are still very new to the async/await keywords and have misconceptions about what they are and what they do (I’ve tried to clarify some of these in this Async/Await FAQ).  One of the more common misconceptions is that a method...

Parallel ExtensionsTask Parallel Library.NET 4.5
Aug 21, 2012
0
0

TPL Dataflow NuGet Package for .NET 4.5

As just announced on the Base Class Libraries (BCL) team blog, the RTM release of TPL Dataflow is now available.Enjoy...

Parallel Extensions.NET 4.5Async
Aug 15, 2012
0
0

Implementing Then with Await

In a post a while ago, I talked about sequential composition of asynchronous operations.  Now that we have the async/await keywords in C# and Visual Basic, such composition is trivial, and async/await are indeed the recommended way to achieve such composition with these languages.However, in that post I also described a few “Then” ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Aug 2, 2012
0
9

Processing tasks as they complete

Recently I’ve had several folks ask me about how to process the results of tasks as those tasks complete.A developer will have multiple tasks representing asynchronous operations they’ve initiated, and they want to process the results of these tasks, e.g. List<Task<T>> tasks = …; foreach(var t in tasks...

Parallel ExtensionsTask Parallel Library.NET 4.5
Jun 15, 2012
4
12

ExecutionContext vs SynchronizationContext

I’ve been asked a few times recently various questions about ExecutionContext and SynchronizationContext, for example what the differences are between them, what it means to “flow” them, and how they relate to the new async/await keywords in C# and Visual Basic.  I thought I’d try to tackle some of those questions here....

.NET 4.NET 4.5Async
Jun 14, 2012
0
0

Using async/await in WinRT async operations

Several weeks ago, I wrote a post for the Windows 8 app developer blog that was all about using await and AsTask to consume WinRT async operations.  I've now published a follow-up post that's all about exposing .NET tasks as WinRT async operation.  In a sense, you can think about the first post as showing how to convert from WinRT ...

Parallel ExtensionsTask Parallel Library.NET 4.5
May 31, 2012
0
0

Performance consideration for Async/Await and MarshalByRefObject

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 ...

Parallel ExtensionsTask Parallel Library.NET 4.5
May 31, 2012
0
0

What’s New for Parallelism in Visual Studio 2012 RC

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 features ...

Parallel ExtensionsTask Parallel Library.NET 4.5
May 8, 2012
0
0

ConcurrentQueue holding on to a few dequeued elements

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 to ...

Parallel Extensions.NET 4.NET 4.5