.NET Parallel Programming

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

ParallelExtensionsExtras Tour – #13 – AsyncCall

(The full set of ParallelExtensionsExtras Tour posts is available here.)Producer/consumer scenarios could logically be split into two categories: those where the consumers are synchronous, blocking waiting for producers to generate data, and those where the consumers are asynchronous, such that they're alerted to data being available and only ...

Performance of Concurrent Collections in .NET 4

.NET 4 introduces new data structures designed to simplify thread-safe access to shared data, and to increase the performance and scalability of multi-threaded applications. To best take advantage of these data structures, it helps to understand their performance characteristics in different scenarios.Chunyan Song, Emad Omara and Mike Liddell ...

ParallelExtensionsExtras Tour – #12 – AsyncCache

(The full set of ParallelExtensionsExtras Tour posts is available here.)Caches are ubiquitous in computing, serving as a staple of both hardware architecture and software development.  In software, caches are often implemented as dictionaries, where some data is retrieved or computed based on a key, and then that key and its resulting ...

ParallelExtensionsExtras Tour – #4 – BlockingCollectionExtensions

(The full set of ParallelExtensionsExtras Tour posts is available here.)   BlockingCollection<T> encapsulates the core synchronization and coordination necessary to enable classic producer/consumer patterns.  ParallelExtensionsExtras provides the BlockingCollectionExtensions.cs file, which contains several extension ...