.NET Parallel Programming

All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…

New Feature? :: Delayed cancellation

 We’re interested in adding support for scheduling cancellation.  For example: // Create a token source that will Cancel() after a delay var cts = new CancellationTokenSource(TimeSpan.FromMilliseconds(100));// And/or schedule a Cancel() call cts.CancelAfter(TimeSpan.FromMilliseconds(100));We’ve heard from many folks ...

Creating pre-completed Tasks

 We’ve been considering adding support for creating completed Tasks from an existing result.  Here’s a prototypical example of where this could be valuable. void Task<float> ComputeAsync(...) {     if (!resultIsCached)     {         return Task<...

DryadLinq now available also for non-academic use

Several months ago, Microsoft announced for academic customers the availability of DryadLINQ.  DryadLINQ is a LINQ provider developed by Microsoft Research that enables  .NET developers to use the LINQ programming model for writing distributed queries and computations against a cluster of computers using Windows HPC Server. DryadLINQ...

Feedback requested: Enumerating Concurrent Collections

The June 2008 CTP of Parallel Extensions contained a first look at some of the work we're doing to augment the .NET Framework with a set of additional coordination data structures that aid in the development of highly concurrent applications.  This included two thread-safe collections, ConcurrentQueue<T> and ConcurrentStack<T>...

Feedback requested: TaskManager shutdown, Fair scheduling

One of the primary reasons we've released CTPs of Parallel Extensions is to solicit feedback on the design and functionality it provides.  Does it provide all of the APIs you need to get your job done?  Are there scenarios you wished the APIs supported and that you need to work around in klunky ways?  And so forth.  We've ...