Sign in
|
Join
|
Help
Home
Blogs
WordPress Blogs
Media
All Tags
»
C#
»
Parallelism
(
RSS
)
MVP WordPress Blogs
Loading...
Tags
.NET
Advisories / Bulletins
ASP.NET
C#
Community
ConfigMgr 2007
Digital Media
Events
Exchange
General
General Security News
Media Center
Microsoft
News
Rants
Security
Sharepoint
SPPS03_Tips
SQL Server
System Center
Tools
VB
Vista
Windows 7
Windows Server
Browse Blog Posts by Tags
Showing related tags and posts for the
Blogs
application. See
all tags in the site
.NET
.NET 4
Algorithms
C# 4
PLINQ
Windows Forms
WPF
ConcurrentDictionary<TKey,TValue> used with Lazy<T>
In a recent thread on the MSDN forum for the TPL, Stephen Toub suggested mixing ConcurrentDictionary<T,U> with Lazy<T>. This provides a fantastic model for creating a thread safe dictionary of values where the construction of the...
Posted to
Reed Copsey, Jr.
by on Sun, Jan 16 2011
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
Algorithms
,
.NET
Parallelism in .NET – Part 20, Using Task with Existing APIs
Although the Task class provides a huge amount of flexibility for handling asynchronous actions, the .NET Framework still contains a large number of APIs that are based on the previous asynchronous programming model. While Task and Task<T>...
Posted to
Reed Copsey, Jr.
by on Wed, Oct 27 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 19, TaskContinuationOptions
My introduction to Task continuations demonstrates continuations on the Task class. In addition, I’ve shown how continuations allow handling of multiple tasks in a clean, concise manner. Continuations can also be used to handle exceptional...
Posted to
Reed Copsey, Jr.
by on Tue, Oct 26 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 18, Task Continuations with Multiple Tasks
In my introduction to Task continuations I demonstrated how the Task class provides a more expressive alternative to traditional callbacks. Task continuations provide a much cleaner syntax to traditional callbacks, but there are other reasons to...
Posted to
Reed Copsey, Jr.
by on Mon, Jul 19 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 17, Think Continuations, not Callbacks
In traditional asynchronous programming, we’d often use a callback to handle notification of a background task’s completion. The Task class in the Task Parallel Library introduces a cleaner alternative to the traditional callback: continuation tasks...
Posted to
Reed Copsey, Jr.
by on Mon, Apr 19 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
WPF
,
Windows Forms
Parallelism in .NET – Part 16, Creating Tasks via a TaskFactory
The Task class in the Task Parallel Library supplies a large set of features. However, when creating the task, and assigning it to a TaskScheduler, and starting the Task, there are quite a few steps involved. This gets even more cumbersome...
Posted to
Reed Copsey, Jr.
by on Fri, Mar 26 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 15, Making Tasks Run: The TaskScheduler
In my introduction to the Task class, I specifically made mention that the Task class does not directly provide it’s own execution. In addition, I made a strong point that the Task class itself is not directly related to threads or multithreading...
Posted to
Reed Copsey, Jr.
by on Thu, Mar 18 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 14, The Different Forms of Task
Before discussing Task creation and actual usage in concurrent environments, I will briefly expand upon my introduction of the Task class and provide a short explanation of the distinct forms of Task. The Task Parallel Library includes four distinct...
Posted to
Reed Copsey, Jr.
by on Wed, Mar 17 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 13, Introducing the Task class
Once we’ve used a task-based decomposition to decompose a problem, we need a clean abstraction usable to implement the resulting decomposition. Given that task decomposition is founded upon defining discrete tasks, .NET 4 has introduced a new API...
Posted to
Reed Copsey, Jr.
by on Mon, Mar 15 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 12, More on Task Decomposition
Many tasks can be decomposed using a Data Decomposition approach, but often, this is not appropriate. Frequently, decomposing the problem into distinctive tasks that must be performed is a more natural abstraction. However, as I mentioned in Part...
Posted to
Reed Copsey, Jr.
by on Fri, Mar 5 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 11, Divide and Conquer via Parallel.Invoke
Many algorithms are easily written to work via recursion. For example, most data-oriented tasks where a tree of data must be processed are much more easily handled by starting at the root, and recursively “walking” the tree. Some algorithms...
Posted to
Reed Copsey, Jr.
by on Fri, Feb 26 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 10, Cancellation in PLINQ and the Parallel class
Many routines are parallelized because they are long running processes. When writing an algorithm that will run for a long period of time, its typically a good practice to allow that routine to be cancelled. I previously discussed terminating...
Posted to
Reed Copsey, Jr.
by on Wed, Feb 17 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
PLINQ
Parallelism in .NET – Part 9, Configuration in PLINQ and TPL
Parallel LINQ and the Task Parallel Library contain many options for configuration. Although the default configuration options are often ideal, there are times when customizing the behavior is desirable. Both frameworks provide full configuration...
Posted to
Reed Copsey, Jr.
by on Thu, Feb 11 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
PLINQ
Parallelism in .NET – Part 8, PLINQ’s ForAll Method
Parallel LINQ extends LINQ to Objects, and is typically very similar. However, as I previously discussed, there are some differences. Although the standard way to handle simple Data Parellelism is via Parallel.ForEach, it’s possible to do...
Posted to
Reed Copsey, Jr.
by on Wed, Feb 3 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
PLINQ
Parallelism in .NET – Part 7, Some Differences between PLINQ and LINQ to Objects
In my previous post on Declarative Data Parallelism, I mentioned that PLINQ extends LINQ to Objects to support parallel operations. Although nearly all of the same operations are supported, there are some differences between PLINQ and LINQ to Objects...
Posted to
Reed Copsey, Jr.
by on Thu, Jan 28 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
PLINQ
Parallelism in .NET – Part 6, Declarative Data Parallelism
When working with a problem that can be decomposed by data, we have a collection, and some operation being performed upon the collection. I’ve demonstrated how this can be parallelized using the Task Parallel Library and imperative programming using...
Posted to
Reed Copsey, Jr.
by on Tue, Jan 26 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
,
PLINQ
Parallelism in .NET – Part 5, Partitioning of Work
When parallelizing any routine, we start by decomposing the problem. Once the problem is understood, we need to break our work into separate tasks, so each task can be run on a different processing element. This process is called partitioning...
Posted to
Reed Copsey, Jr.
by on Tue, Jan 26 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 4, Imperative Data Parallelism: Aggregation
In the article on simple data parallelism, I described how to perform an operation on an entire collection of elements in parallel. Often, this is not adequate, as the parallel operation is going to be performing some form of aggregation. Simple...
Posted to
Reed Copsey, Jr.
by on Fri, Jan 22 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 3, Imperative Data Parallelism: Early Termination
Although simple data parallelism allows us to easily parallelize many of our iteration statements, there are cases that it does not handle well. In my previous discussion, I focused on data parallelism with no shared state, and where every element...
Posted to
Reed Copsey, Jr.
by on Fri, Jan 22 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Parallelism in .NET – Part 2, Simple Imperative Data Parallelism
In my discussion of Decomposition of the problem space, I mentioned that Data Decomposition is often the simplest abstraction to use when trying to parallelize a routine. If a problem can be decomposed based off the data, we will often want to use...
Posted to
Reed Copsey, Jr.
by on Wed, Jan 20 2010
Filed under:
Filed under:
C#
,
.NET 4
,
Parallelism
,
C# 4
,
Algorithms
,
.NET
Page 1 of 2 (22 items) 1
2
Next >