Showing results for Task Parallel Library - .NET Blog

Apr 5, 2010
Post comments count0
Post likes count0

ParallelExtensionsExtras Tour – #3 – Additional Task Extensions Methods

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)  In our last ParallelExtensionsExtras tour post, we discussed implementing an extension ToObservable method for Task<TResult>.  This is just one of a myriad of extra pieces of functionality that are useful with Tasks, and the TaskExtrasExtensions.cs f...

.NET Parallel Programming
Apr 4, 2010
Post comments count0
Post likes count0

ParallelExtensionsExtras Tour – #2 – Task.ToObservable

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)  In our previous ParallelExtensionsExtras tour post, we discussed a custom implementation of the LINQ operators, in particular for working with Task<TResult> instances in an asynchronous manner. There is already an impressive implementation of the LINQ ope...

.NET Parallel Programming
Apr 4, 2010
Post comments count0
Post likes count0

ParallelExtensionsExtras Tour – #1 – LINQ to Tasks

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.) The .NET Framework developer center provides a concise description of Language Integrated Query (LINQ):LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations. It extends C# and Visual Basic with nativ...

.NET Parallel Programming
Mar 27, 2010
Post comments count0
Post likes count0

Parent-Child Task Relationships in the .NET Framework 4

Igor Ostrovsky - MSFT
Igor Ostrovsky - MSFT

The Task Parallel Library in the .NET Framework 4 provides an opt-in feature that enables parent-child relationships between tasks.  This relationship brings with it some additional behaviors, including that a parent task is not considered completed until all of its child tasks have completed, and that exceptions from any f...

.NET Parallel Programming
Mar 2, 2010
Post comments count0
Post likes count0

FAQ :: Parallel.ForEach and non-generic collections?

Danny Shih
Danny Shih

.NET 2.0 introduced Generics to allow enhanced code reusability and type safety.  Since then, generic collections (IEnumerable<T>, List<T>, Dictionary<T>, etc.) have become standard and are recommended over their non-generic counterparts (IEnumerable, ArrayList, HashTable, etc.).  As a result, Parallel.ForEach only suppo...

.NET Parallel Programming
Feb 10, 2010
Post comments count0
Post likes count0

“Parallelism in .NET” Series by Reed Copsey, Jr.

Igor Ostrovsky - MSFT
Igor Ostrovsky - MSFT

Reed Copsey, Jr. has been writing a great series of articles on parallelism with the .NET Framework 4. The articles provide the insights of an expert developer who has been using parallelism with .NET to speed up real-world programs. Recommended reading.Parallelism in .NETIntroductionPart 1, Decomposition Par...

.NET Parallel Programming
Feb 9, 2010
Post comments count0
Post likes count0

Maintaining a Consistent Application State with TPL

Zlatko Michailov - MSFT
Zlatko Michailov - MSFT

The aim of this post is to help developers writing applications in which operations may need to be performed and then later undone due to a subsequent failure. It shows a pattern for how to maintain such a consistent application state by utilizing functionality from the Task Parallel Library (TPL) in the .NET Framework 4. For the purposes of this ...

.NET Parallel Programming
Jan 11, 2010
Post comments count0
Post likes count0

FAQ :: The Debugger does not correctly handle Task exceptions?

Danny Shih
Danny Shih

The following code correctly observes and handles a Task exception and should print “gotcha!” to the console.  By default though, the Debugger will report a crash.Task t = Task.Factory.StartNew(() => { throw new Exception("poo"); }); try { t.Wait(); } catch (AggregateException) { Console.WriteLine("gotcha!"); } The issue has to ...

.NET Parallel Programming
Jan 5, 2010
Post comments count0
Post likes count0

FAQ :: Why is the speedup not X on my X-way machine?

Danny Shih
Danny Shih

We’ll be regularly posting answers to frequently asked questions that we’ve gotten on the forum, internal email lists, etc.  Here’s the first – enjoy! Why is the speedup not X on my X-way machine?  Or, why does my parallel code run slower?  Less than ideal speedup can typically be attributed to two things: 1.    &...

.NET Parallel Programming
Dec 9, 2009
Post comments count0
Post likes count0

A Tour Through the Parallel Programming Samples for .NET 4

Stephen Toub - MSFT
Stephen Toub - MSFT

On Code Gallery, we have a plethora of samples that highlight aspects of the .NET Framework 4 that help with writing scalable and efficient parallel applications.  This post examines each of those samples, providing an overview of what each provides.

.NET Parallel Programming