Welcome to MSDN Blogs Sign in | Join | Help

News

  • These postings are provided "AS IS" with no warranties and confer no rights. All code and tools presented are done so under the Microsoft Public License.

June 2009 - Posts

Asynchronous methods, C# iterators, and Tasks
More and more, developers are realizing the significant scalability advantages that asynchronous programming can provide, especially as it relates to I/O. Consider an application that needs to copy data from one stream to another stream, such as is being Read More...
Don’t dispose of objects that you don’t own
In concurrent programs, race conditions are a fact of life but they aren’t all bad.  Sometimes, race conditions are benign, as is often the case with lazy initialization.  The problem with racing to set a value, however, is that it can result Read More...
Parallel For Loops over Non-Integral Types
In a previous post, it was demonstrated how for loops with very small loop bodies could be parallelized by creating an iterator over ranges, and then using Parallel.ForEach over those ranges. A similar technique can be used to write parallel loops over Read More...
Cancellation in Parallel Extensions
One of the great features that crosses all of Parallel Extensions types is a consistent approach to cancellation (see http://blogs.msdn.com/pfxteam/archive/2009/05/22/9635790.aspx ). In this post we explore some of the ways cancellation is used in Parallel Read More...
Tasks and the Event-based Asynchronous Pattern
As has been discussed previously, one of the new features in the Task Parallel Library is TaskCompletionSource<TResult> , which enables the creation of a Task<TResult> that represents any other asynchronous operation.  There are a wide Read More...
How PLINQ processes an IEnumerable<T> on multiple cores
As Ed Essey explained in Partitioning in PLINQ , partitioning is an important step in PLINQ execution. Partitioning splits up a single input sequence into multiple sequences that can be processed in parallel. This post further explains chunk partitioning, Read More...
Tasks and the APM Pattern
The Asynchronous Programming Model (APM) in the .NET Framework has been around since .NET 1.0 and is the most common pattern for asynchrony in the Framework.  Even if you’re not familiar with the name, you’re likely familiar with the core of the Read More...
Achieving Speedups with Small Parallel Loop Bodies
The Parallel class represents a significant advancement in parallelizing managed loops. For many common scenarios, it just works, resulting in terrific speedups. However, while ideally Parallel.For could be all things to all people, such things rarely Read More...
Mechanisms for Creating Tasks
The core entity in the Task Parallel Library around which everything else revolves is System.Threading.Tasks.Task. The most common way of creating a Task will be through the StartNew method on the TaskFactory class, a default instance of which is exposed Read More...
The Nature of TaskCompletionSource<TResult>
The Task Parallel Library is centered around the Task class and its derived Task<TResult> . The main purpose of these types is to represent the execution of an asynchronous workload and to provide an object with a means to operate on that workload, Read More...
CLR 4 – Inside the ThreadPool
As we’ve mentioned previously, the .NET ThreadPool has undergone some serious renovations in .NET 4, improvements on which the Task Parallel Library and PLINQ both rely.  Erika Parsons and Eric Eilebrecht are the PM and developer on the CLR team Read More...
Page view tracker