Geeks With Blogs
Josh Reuben

 

The TPL (Task Parallel Library) of NET 4 contains a plethora of datatypes for implicit / explicit data and task parallelism + several synchronization primatives. Of course, when you learn something, its never the end of the story…

http://code.msdn.microsoft.com/ParExtSamples contains a class library which leverages and complements the functionality available in the .NET Framework 4 TPL. Please find below my spelunk into this class library:

 

 

 

Parallel General Extensions

  • AggregateExceptionExtensions

  • BlockingCollectionExtensions – the precursor to C# 5 Asynchrony TAP pattern Join construct ?

  • CompletedTask – provides access to an already completed task – useful for using ContinueWith overloads that arnt StartNew equivelents

  • ConcurrentDictionaryExtensions

  • IProducerConsumerCollectionExtensions

  • LazyExtensions

  • LinqToTasks – provides LINQ support for Tasks

  • ParallelLinqOptions – provides a grouping for PLINQ options

  • PlinqExtensions

  • TaskCompletionSourceExtensions

  • TaskExtensions

 

Coordination Data Structures

  • ActionCountdownEvent – runs an Action when a CountdownEvent reaches zero

  • AsynchCache – Caches asynchronously retrieved data – eg streamed data

  • ConcurrentPriorityQueue – a thread safe priority queue structure

  • ConcurrentRandomNumberGenerator – a thread safe psuedo random number generator

  • ObjectPool – a thread safe random number generator

  • ObservableConcurrentCollection – a thread safe concurrent collection for use with data binding

  • ObservableConcurrentDictionary – a thread safe concurrent dictionary for use with data binding

  • Pipeline – provides support for pipeline data processing

  • ProducerConsumerCollectionBase – Provides a base implementation for producer-consumer collections that wrap other producer-consumer collections.

  • ReductionVariable – Provides a reduction variable for aggregating data across multiple threads involved in a computation

  • SpinLockClass – provides a simple referrence type wrapper for SpinLock struct

 

APM

  • FileAsync – provides asych counterparts to members of the File class

  • StreamExtensions – extension methods for asynchronously working with streams

  • WebRequestExtensions - extension methods for asynchronously working with web requests

 

EAP

  • EAPCommon

  • PingExtensions – extension methods for asynchronously working with Ping

  • SmtpClientExtensions – extension methods for asynchronously working with SMTP client

  • WebClientExtensions – extension methods for asynchronously working with Web Client

 

TaskFactoryExtensions

  • TaskFactoryExtensions

  • SelfReplicatingTask – provides a task capable of replicating itself

 

Parallel Algorithms

  • ParallelAlgorithms

 

Partitioners

  • ChunkPartitioner – partitions an enumerable into chunks based on user supplied criteria
  • RangePartitioner – partitions a range into sub-ranges. For very small loop bodies with a large number of iterations that require equal amounts of processing time, Parallel.ForEach with a RangePartitioner may be more efficient than a Parallel.For.

 

Task Schedulers

  • IOTaskScheduler - Provides a task scheduler that targets the I/O ThreadPool

  • LimitedConcurrencyLevelTaskScheduler - Provides a task scheduler that ensures a maximum concurrency level while running on top of the ThreadPool.
  • OrderedTaskScheduler - Provides a task scheduler that ensures only one task is executing at a time, and that tasks execute in the order that they were queued.

  • PrioritizingTaskScheduler - Provides a task scheduler that supports reprioritizing previously queued tasks

  • RoundRobinTaskScheduler - Enables the creation of a group of schedulers that support round-robin scheduling for fairness.

  • StaTaskScheduler - Provides a scheduler that uses STA threads

  • SynchronizationContextTaskScheduler - Provides a task scheduler that targets a specific SynchronizationContext

  • ThreadPerTaskScheduler - Provides a task scheduler that dedicates a thread per task

  • WorkStealingTaskScheduler -

 

Posted on Sunday, November 14, 2010 8:27 AM Parallelism | Back to top


Comments on this post: Parallel Extensions Extras

# re: Parallel Extensions Extras
Requesting Gravatar...
A good application makes it easier to develop a program by providing all the parts. - Antiquities of California
Left by Lira Sale on Dec 22, 2016 4:45 PM

Your comment:
 (will show your gravatar)


Copyright © JoshReuben | Powered by: GeeksWithBlogs.net