Get the Bing + MSN extension Breaking news from around the world Get the Bing + MSN extension

Add it now
This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. Learn more
Skip to main content
Microsoft
.NET Parallel Programming
.NET Parallel Programming
  • Home
  • DevBlogs
    • App Center
    • Azure DevOps
    • Visual Studio
    • Visual Studio Code
    • Visual Studio for Mac
    • Azure Artifacts
    • Azure Boards
    • Azure Pipelines
    • Azure Repos
    • Azure Test Plans
    • DevOps
    • C++
    • Java
    • JavaScript
    • PowerShell
    • Python
    • Q#
    • Scripting
    • TypeScript
    • Visual Basic
    • Visual C#
    • Visual F#
    • .NET
    • ASP.NET
    • NuGet
    • Xamarin
    • Apps for Windows
    • Azure Government
    • Bing Dev Center
    • Command Line
    • DirectX Developer Blog
    • IoT Developer
    • Microsoft Edge Dev
    • Microsoft Azure
    • Office 365 Development
    • Old New Thing
    • PIX on Windows
    • Premier Developer
    • Azure Cosmos DB
    • OData
    • Revolutions R
    • SQL Server Data Tools

    .NET Parallel Programming

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

    Coordination Data Structures

    New in .NET 4.5: ThreadLocal.Values
    AvatarIgor Ostrovsky - MSFTNovember 10, 2011Nov 10, 201111/10/11

    Available since .NET 4, ThreadLocal<T> is a container that holds a separate value for every thread. In practice, ThreadLocal<T> is often convenient for storing per-thread counters, resources, or partial results.
    As mentioned earlier on this blog, we have been thinking about adding a Values property to enumerate over the values from all threads that ever stored a value into the ThreadLocal<T>

    ConcurrentDictionary Performance Improvements in .NET 4.5
    AvatarIgor Ostrovsky - MSFTNovember 8, 2011Nov 8, 201111/8/11

    ConcurrentDictionary is a popular concurrent data structure that was introduced in .NET 4. In the .NET 4.5 release, ConcurrentDictionary gets two performance improvements.
    One optimization is related to the way ConcurrentDictionary avoids torn reads and writes. To explain the background, all reference types and some value types are guaranteed to be read and written atomically by the Common Language Runtime,

    What’s New For Parallelism in .NET 4.5
    AvatarStephen Toub - MSFTSeptember 17, 2011Sep 17, 201109/17/11

    .NET 4 and Visual Studio 2010 saw the introduction of a wide range of new support for parallelism: the Task Parallel Library (TPL), Parallel LINQ (PLINQ), new synchronization and coordination primitives and collections (e.g. ConcurrentDictionary), an improved ThreadPool for handling parallel workloads,

    Parallel Merge Sort using Barrier
    AvatarEmad OmaraJune 6, 2011Jun 6, 201106/6/11

    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 synchronization primitive.

    Little-known gems: Atomic conditional removals from ConcurrentDictionary
    AvatarStephen Toub - MSFTApril 2, 2011Apr 2, 201104/2/11

    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,

    SpinWait.SpinUntil for unit testing
    AvatarStephen Toub - MSFTFebruary 15, 2011Feb 15, 201102/15/11

    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”,

    New Feature? :: ThreadLocal.Values
    AvatarDanny ShihOctober 21, 2010Oct 21, 201010/21/10

    We’ve been considering adding a Values property to
    System.Threading.ThreadLocal<T>.  Values
    would return a collection of all current values from all threads (e.g. what
    you’d get if you evaluated Value from each thread).  This would allow for easy aggregations, and
    in fact in our Parallel Extensions Extras we have a wrapper around
    ThreadLocal<T>

    Using Cancellation Support in .NET Framework 4
    AvatarIgor Ostrovsky - MSFTJuly 2, 2010Jul 2, 201007/2/10

    The .NET Framework 4 introduces a new mechanism for cancellation of operations, based on new types CancellationToken and CancellationTokenSource. This cancellation mechanism is used across the parallel programming libraries: tasks, concurrent collections, and PLINQ queries.
    Using Cancellation Support in .NET Framework 4, written by Mike Liddell,

    Lesser-known Multi-threaded Debugging Support in Visual Studio 2010
    AvatarStephen Toub - MSFTMay 25, 2010May 25, 201005/25/10

    We’ve been very excited about the new debugging windows in Visual Studio 2010, namely Parallel Tasks and Parallel Stacks, as well as the newly revamped Threads window, and thus we’ve talked about them quite a bit. For an overview, you can read the MSDN Magazine article at https://msdn.microsoft.com/en-us/magazine/ee410778.aspx,

    ParallelExtensionsExtras Tour – #14 – SingleItemPartitioner
    AvatarStephen Toub - MSFTApril 28, 2010Apr 28, 201004/28/10

    (The full set of ParallelExtensionsExtras Tour posts is available here.) 
    In a previous ParallelExtensionsExtras Tour blog post, we talked about implementing a custom partitioner for BlockingCollection<T>.  Custom partitioning is an advanced but important feature supported by both Parallel.ForEach and PLINQ, as it allows the developer full control over how data is distributed during parallel processing. 

    • 
    • 2
    • of
    • 5
    • 
    Relevant Links

    corefx repository on GitHub

    .NET

    Microsoft Azure

    Top Bloggers
    Archive
  • February 2015
  • April 2013
  • March 2013
  • February 2013
  • January 2013
  • December 2012
  • November 2012
  • October 2012
  • September 2012
  • August 2012
  • June 2012
  • May 2012
  • April 2012
  • March 2012
  • February 2012
  • January 2012
  • December 2011
  • November 2011
  • October 2011
  • September 2011
  • June 2011
  • May 2011
  • April 2011
  • February 2011
  • January 2011
  • November 2010
  • October 2010
  • August 2010
  • July 2010
  • June 2010
  • May 2010
  • April 2010
  • March 2010
  • February 2010
  • January 2010
  • December 2009
  • November 2009
  • October 2009
  • September 2009
  • August 2009
  • July 2009
  • June 2009
  • May 2009
  • April 2009
  • March 2009
  • February 2009
  • January 2009
  • December 2008
  • November 2008
  • October 2008
  • September 2008
  • August 2008
  • July 2008
  • June 2008
  • May 2008
  • April 2008
  • March 2008
  • February 2008
  • January 2008
  • December 2007
  • November 2007
  • Stay informed

    Login
    What's new
    • Surface Pro X
    • Surface Laptop 3
    • Surface Pro 7
    • Windows 10 apps
    • Office apps
    Microsoft Store
    • Account profile
    • Download Center
    • Microsoft Store support
    • Returns
    • Order tracking
    • Store locations
    • Buy online, pick up in store
    • In-store events
    Education
    • Microsoft in education
    • Office for students
    • Office 365 for schools
    • Deals for students & parents
    • Microsoft Azure in education
    Enterprise
    • Azure
    • AppSource
    • Automotive
    • Government
    • Healthcare
    • Manufacturing
    • Financial services
    • Retail
    Developer
    • Microsoft Visual Studio
    • Windows Dev Center
    • Developer Network
    • TechNet
    • Microsoft developer program
    • Channel 9
    • Office Dev Center
    • Microsoft Garage
    Company
    • Careers
    • About Microsoft
    • Company news
    • Privacy at Microsoft
    • Investors
    • Diversity and inclusion
    • Accessibility
    • Security
    English (United States)
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2019