Showing results for .NET 4 - .NET Parallel Programming

Nov 1, 2011
0
0

Updated Async CTP

Stephen Toub - MSFT
Stephen Toub - MSFT

In April, we released the Async CTP Refresh, and since then we've seen fantastic adoption of the technology.  We've also seen the technology landscape evolve.  Windows Phone 7.5, aka "Mango", was released.  Silverlight 5 has had both a Beta and an RC release.  And there have been multiple patches to Visual Studio and the .NET Fr...

Task Parallel Library.NET 4Async
Oct 24, 2011
0
2

Task.Run vs Task.Factory.StartNew

Stephen Toub - MSFT
Stephen Toub - MSFT

In .NET 4, Task.Factory.StartNew was the primary method for scheduling a new task.  Many overloads provided for a highly configurable mechanism, enabling setting options, passing in arbitrary state, enabling cancellation, and even controlling scheduling behaviors.  The flip side of all of this power is complexity.  You need to know w...

Parallel ExtensionsTask Parallel Library.NET 4
Oct 2, 2011
3
1

Don’t Forget To Complete Your Tasks

Stephen Toub - MSFT
Stephen Toub - MSFT

“Don’t forget to complete your tasks.”  That guidance may sound trivial and silly, but I recently saw it as a source of a bug in software written by some very smart folks, and thus thought this would be a good opportunity to remind folks of the imperative.Tasks represent a promise.  If you hand one out, someone else may&...

Parallel ExtensionsTask Parallel Library.NET 4
Sep 27, 2011
0
0

Updated TPL Dataflow CTP

Stephen Toub - MSFT
Stephen Toub - MSFT

It’s been a few months since April when we last released a Community Technology Preview (CTP) of System.Threading.Tasks.Dataflow.dll, aka “TPL Dataflow”.  Today for your programming pleasure, we have another update.As mentioned in “What’s New for Parallelism in .NET 4.5”, System.Threading.Tasks.Dataflow.dll ...

Parallel ExtensionsTask Parallel Library.NET 4
Jun 27, 2011
0
0

Using Tasks to implement the APM Pattern

Stephen Toub - MSFT
Stephen Toub - MSFT

Several times recently, folks have asked how to use tasks to implement the APM pattern, otherwise known as the Asynchronous Programming Model pattern, or the IAsyncResult pattern, or the Begin/End pattern.  While moving forward we encourage folks to use a Task-based pattern for exposing asynchronous operation, the APM pattern has been the prev...

Parallel ExtensionsTask Parallel Library.NET 4
Jun 6, 2011
0
0

Parallel Merge Sort using Barrier

Emad Omara
Emad Omara

Sorting is one of the most fundamental problems in software algorithms; there are many sequential sorting algorithms with different time and memory complexities, but when it comes to parallel sort, things get more complicated. I will explain a simple and scalable algorithm to write a parallel sort using the .NET 4.0 System.Threading.Barrier synchro...

Parallel ExtensionsTask Parallel Library.NET 4
May 3, 2011
0
0

More case studies on .NET 4 parallelism support

Stephen Toub - MSFT
Stephen Toub - MSFT

When .NET 4 was launched, we blogged about several case studies published regarding usage of .NET 4 to parallelize applications.  Quite recently, several additional case studies have been published.  I love reading these in order to better understand how folks are applying this technology, and parallelism in general, to improve their solu...

.NET 4
Apr 13, 2011
0
0

TPL Dataflow CTP Refresh

Stephen Toub - MSFT
Stephen Toub - MSFT

Today, we released a new CTP of TPL Dataflow, otherwise known as System.Threading.Tasks.Dataflow.dll.  You can download this as part of the Microsoft Visual Studio Async CTP, which will also install the new C#/Visual Basic support for writing asynchronous methods, or you can install the DLL itself through the installer available on the DevLabs...

Task Parallel Library.NET 4Async
Apr 2, 2011
0
2

Little-known gems: Atomic conditional removals from ConcurrentDictionary

Stephen Toub - MSFT
Stephen Toub - MSFT

ConcurrentDictionary<TKey,TValue>, first introduced in .NET 4, is an efficient dictionary data structure that enables thread-safe reading and writing, meaning that multiple threads may all be accessing the dictionary at the same time without corrupting it.  It supports adding through its TryAdd method, conditional updates through its Try...

.NET 4Coordination Data Structures
Feb 15, 2011
0
0

SpinWait.SpinUntil for unit testing

Stephen Toub - MSFT
Stephen Toub - MSFT

One of the hidden gems in .NET 4 is the System.Threading.SpinWait type.  This type is typically used for implementing lock-free solutions, and is used heavily throughout the rest of the threading and parallelism support in .NET 4.  That’s why I call it “hidden”, because most folks don’t implement their own lock-fre...

Parallel Extensions.NET 4Coordination Data Structures