Showing results for .NET 4 - .NET Blog

Apr 21, 2010
Post comments count0
Post likes count0

When To Use Parallel.ForEach and When to Use PLINQ

Igor Ostrovsky - MSFT
Igor Ostrovsky - MSFT

If you've played around with PLINQ and Parallel.ForEach loops in .NET 4, you may have noticed that many PLINQ queries can be rewritten as parallel loops, and also many parallel loops can be rewritten as PLINQ queries. However, both parallel loops and PLINQ have distinct advantages in different situations. When writing ...

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

A Tour of Various TPL Options

Igor Ostrovsky - MSFT
Igor Ostrovsky - MSFT

The Task Parallel Library (TPL) exposes various options that give you more control over how tasks get scheduled and executed: Joseph E. Hoag's article A Tour of Various TPL Options explains these options in detail, accompanied by examples of correct and incorrect uses.(This paper and many more are available through the Parallel Computing D...

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

Parallel Computing Sessions at the Visual Studio 2010 Launch

Stephen Toub - MSFT
Stephen Toub - MSFT

Thanks to everyone who attended our three breakout sessions at the Visual Studio 2010 Launch and DevConnections conference this week in Las Vegas.  Attached to this blog post are the slide decks that were presented at the talks.  The code from the talks is available either as part of our Parallel Programming in .NET 4 samples at htt...

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

ParallelExtensionsExtras Tour – #11 – ParallelDynamicInvoke

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)  Delegates in .NET may have one or more methods in their invocation list.  When you invoke a delegate, such as through the Delegate.DynamicInvoke method, the net result is that all of the methods in the invocation list get invoked, one after the other.  Of...

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

ParallelExtensionsExtras Tour – #10 – Pipeline

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)  Producer/consumer is a fundamental pattern employed in many parallel applications.  With producer/consumer, one or more producer threads generate data that is consumed by one or more consumer threads.  These consumers can themselves also be producers of f...

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

ThreadPool performance you can see

Stephen Toub - MSFT
Stephen Toub - MSFT

We've spent a lot of time touting improvements to the .NET Framework in .NET 4 around threading, including core enhancements to the performance of the runtime itself.  Sometimes data is more powerful than words, however, and it's useful to be able to see exactly what kind of difference such improvements can make.  To assist with that, her...

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

ParallelExtensionsExtras Tour – #9 – ObjectPool

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.) An object pool is a mechanism/pattern to avoid the repeated creation and destruction of objects.  When code is done with an object, rather than allowing it to be garbage collected (and finalized if it’s finalizable), you put the object back into a spe...

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

New case studies on Parallel Extensions

Stephen Toub - MSFT
Stephen Toub - MSFT

In coordination with today's launch of Visual Studio 2010 and the .NET Framework 4, several case studies have been published on how companies are taking advantage of parallel computing with the .NET Framework to improve the performance of their applications.  It's exciting to see the benefits these companies are seeing and how parallelism is s...

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

Visual Studio 2010 and the .NET Framework 4 are now available!

Stephen Toub - MSFT
Stephen Toub - MSFT

As announced here, Visual Studio 2010 and the .NET Framework 4 are available!  This includes the exciting support for parallel computing that we've been talking about for quite some time now.  For an overview of what's new for developers with managed code, both in terms of frameworks and tools, check out this new article on DevProConnecti...

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

ParallelExtensionsExtras Tour – #8 – ReductionVariable

Stephen Toub - MSFT
Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.) The new .NET 4 System.Threading.ThreadLocal<T> is quite useful when you need per-thread, per-instance storage.  This is in contrast to the fast ThreadStaticAttribute, which supports only per-thread storage (in .NET 4, ThreadLocal<T> actually layers o...

.NET Parallel Programming