Sign In
Parallel Programming with .NET
All about System.Threading, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more...
Translate This Page
Translate this page
Powered by
Microsoft® Translator
Options
RSS for posts
Atom
RSS for comments
OK
Search
Advanced search options...
Search In:
Everything
Blogs
Forums
People
Groups
Places
Pages
Date range:
All Time
Last Year
Last 6 Months
Last 3 Months
Last Month
Last Week
Last Two Days
Tags
.NET 4
.NET 4.5
Article Summary
Async
Beta
C++
Code Samples
Coordination Data Structures
CTP
Dataflow
FAQ
Feedback Requested
Media
MSDN
Parallel Extensions
ParallelExtensionsExtras
Parallelism Blockers
PLINQ
Release
Talks
Task
Task Parallel Library
ThreadPool
Tools
Visual Studio 2010
Archive
Archives
February 2012
(2)
January 2012
(5)
December 2011
(3)
November 2011
(8)
October 2011
(5)
September 2011
(6)
June 2011
(3)
May 2011
(3)
April 2011
(2)
February 2011
(1)
January 2011
(6)
November 2010
(2)
October 2010
(5)
August 2010
(2)
July 2010
(3)
June 2010
(7)
May 2010
(6)
April 2010
(23)
March 2010
(3)
February 2010
(10)
January 2010
(6)
December 2009
(3)
November 2009
(12)
October 2009
(10)
September 2009
(1)
August 2009
(3)
July 2009
(6)
June 2009
(11)
May 2009
(13)
April 2009
(4)
March 2009
(2)
February 2009
(4)
January 2009
(1)
December 2008
(1)
November 2008
(3)
October 2008
(6)
September 2008
(1)
August 2008
(5)
July 2008
(2)
June 2008
(15)
May 2008
(4)
April 2008
(1)
March 2008
(6)
February 2008
(6)
January 2008
(4)
December 2007
(10)
November 2007
(6)
MSDN Blogs
>
Parallel Programming with .NET
Posts
Subscribe via RSS
Sort by:
Most Recent
|
Most Views
|
Most Comments
Excerpt View
|
Full Post View
Parallel Programming with .NET
Know Thine Implicit Allocations
Posted
1 hour ago
by
Stephen Toub - MSFT
0
Comments
For .NET 4.5, we’ve invested quite a bit of effort into performance, and in particular for the Task Parallel Library (Joe Hoag wrote a good paper covering some of these improvements). We focused such effort on TPL because it is a core component...
Parallel Programming with .NET
Await, SynchronizationContext, and Console Apps: Part 3
Posted
20 hours ago
by
Stephen Toub - MSFT
0
Comments
In Part 1 and Part 2 of this short series, I demonstrated how you can build a SynchronizationContext and use it run an async method such that all of the continuations in that method will run on serialized on the current thread. This can be helpful when...
Parallel Programming with .NET
Advanced APM Consumption in Async Methods
Posted
11 days ago
by
Stephen Toub - MSFT
1
Comments
I’ve previously blogged about how to expose existing Asynchronous Programming Model (APM) implementations as Task-based methods. This can be done manually using a TaskCompletionSource<TResult>, or it can be done using the built-in wrapper...
Parallel Programming with .NET
Await, SynchronizationContext, and Console Apps: Part 2
Posted
13 days ago
by
Stephen Toub - MSFT
0
Comments
Yesterday, I blogged about how you can implement a custom SynchronizationContext in order to pump the continuations used by async methods so that they may be processed on a single, dedicated thread. I also highlighted that this is basically what...
Parallel Programming with .NET
Implementing a SynchronizationContext.SendAsync method
Posted
14 days ago
by
Stephen Toub - MSFT
0
Comments
I recently saw two unrelated questions, the answers to which combine to form a potentially useful code snippet. The first question was about SynchronizationContext. SynchronizationContext provides a Post method, which asynchronously schedules the supplied...
Parallel Programming with .NET
Await, SynchronizationContext, and Console Apps
Posted
14 days ago
by
Stephen Toub - MSFT
2
Comments
When I discuss the new async language features of C# and Visual Basic, one of the attributes I ascribe to the await keyword is that it “tries to bring you back to where you were.” For example, if you use await on the UI thread of your WPF...
Parallel Programming with .NET
FAQ on Task.Start
Posted
20 days ago
by
Stephen Toub - MSFT
8
Comments
Recently I’ve heard a number of folks asking about Task.Start, when and when not to use it, how it behaves,and so forth. I thought I’d answer some of those questions here in an attempt to clarify and put to rest any misconceptions about what it...
Parallel Programming with .NET
Awaiting Socket Operations
Posted
1 month ago
by
Stephen Toub - MSFT
9
Comments
The System.Net.Sockets.Socket class in .NET exposes multiple sets of asynchronous methods that perform the same basic operations but that are exposed with different patterns. The first set follows the APM pattern, where for a synchronous method like...
Parallel Programming with .NET
Paper :: Guide to Implementing Custom TPL Dataflow Blocks
Posted
1 month ago
by
Danny Shih
1
Comments
TPL Dataflow includes a number of built-in, already-implemented blocks that target the most common scenarios. Additionally, some flexibility is provided by the set of options that may be used to tweak block behaviors. However, a developer may still choose...
Parallel Programming with .NET
Coalescing CancellationTokens from Timeouts
Posted
2 months ago
by
Stephen Toub - MSFT
1
Comments
In the .NET Framework 4.5 Developer Preview, you’ll find that CancellationTokenSource now has timeout support built directly into its implementation. This makes it very easy to create a token that will automatically have cancellation requested after...
Parallel Programming with .NET
How to use C++ AMP from C# using WinRT
Posted
2 months ago
by
Igor Ostrovsky - MSFT
1
Comments
In a previous article, How to use C++ AMP to C# , we described how you can use P/Invoke to call into C++ AMP and accelerate your C# apps on GPUs and other heterogeneous hardware. In this post, we'll take a look at how the same task becomes easier in Windows...
Parallel Programming with .NET
New in .NET 4.5: ThreadLocal.Values
Posted
2 months ago
by
Igor Ostrovsky - MSFT
1
Comments
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...
Parallel Programming with .NET
PLINQ Queries That Run in Parallel in .NET 4.5
Posted
2 months ago
by
Igor Ostrovsky - MSFT
5
Comments
One interesting thing to know about PLINQ is that not all queries are guaranteed to execute in parallel (See PLINQ Queries That Run Sequentially for reference). You can think of the AsParallel method as a hint to run in parallel for query shapes that...
Parallel Programming with .NET
Paper :: TPL Performance Improvements in .NET 4.5
Posted
2 months ago
by
Danny Shih
2
Comments
We invested a lot of time into making parallel programming “just faster” for .NET 4.5. You’ve already seen some neat tricks to ConcurrentDictionary . There’s a lot more to say about improving the performance of the Task Parallel Library, and...
Parallel Programming with .NET
Crafting a Task.TimeoutAfter Method
Posted
2 months ago
by
Joe Hoag
4
Comments
Imagine that you have a Task handed to you by a third party, and that you would like to force this Task to complete within a specified time period. However, you cannot alter the “natural” completion path and completion state of the Task, as that may cause...
Parallel Programming with .NET
Exception Handling in TPL Dataflow Networks
Posted
2 months ago
by
Cristina Manu
0
Comments
A “dataflow block” is represented by a class implementing the IDataflowBlock interface. The state of a dataflow block is represented by the state of its IDataflowBlock.Completion Task, which itself has a Status property. When a dataflow block is in active...
Parallel Programming with .NET
ConcurrentDictionary Performance Improvements in .NET 4.5
Posted
2 months ago
by
Igor Ostrovsky - MSFT
2
Comments
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...
Parallel Programming with .NET
Updated Async CTP
Posted
3 months ago
by
Stephen Toub - MSFT
3
Comments
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...
Parallel Programming with .NET
When at last you await
Posted
3 months ago
by
Stephen Toub - MSFT
3
Comments
When you start using async methods heavily, you’ll likely see a particular pattern of composition pop up from time to time. Its structure is typically either of the form: async Task FooAsync() { … // some initialization code without...
Parallel Programming with .NET
Task.Run vs Task.Factory.StartNew
Posted
3 months ago
by
Stephen Toub - MSFT
2
Comments
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...
Parallel Programming with .NET
New articles on async/await in MSDN Magazine
Posted
4 months ago
by
Stephen Toub - MSFT
12
Comments
The October 2011 issue of MSDN Magazine is now available online. In it, you can find three articles about the new async/await features of C# and Visual Basic. While the articles can stand alone, they were written with each other in mind in...
Parallel Programming with .NET
Keeping Async Methods Alive
Posted
4 months ago
by
Stephen Toub - MSFT
4
Comments
Consider a type that will print out a message when it’s finalized, and that has a Dispose method which will suppress finalization: class DisplayOnFinalize : IDisposable { public void Dispose() { GC.SuppressFinalize(this); } ~DisplayOnFinalize...
Parallel Programming with .NET
Don’t Forget To Complete Your Tasks
Posted
4 months ago
by
Stephen Toub - MSFT
5
Comments
“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...
Parallel Programming with .NET
Task Exception Handling in .NET 4.5
Posted
4 months ago
by
Stephen Toub - MSFT
8
Comments
For the .NET Framework 4.5 Developer Preview, a lot of work has been done to improve the Task Parallel Library (TPL), in terms of functionality, in terms of performance, and in terms of integration with the rest of the .NET Framework. With all of this...
Parallel Programming with .NET
Updated TPL Dataflow CTP
Posted
4 months ago
by
Stephen Toub - MSFT
2
Comments
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...
Page 1 of 11 (251 items)
1
2
3
4
5
»