Sign in
MSDN Blogs
Microsoft Blog Images
More ...
Browse by Tags
MSDN Blogs
>
.NET Parallel Programming
>
All Tags
>
code samples
Server & Tools Blogs
>
Developer Tools Blogs
>
Parallel Programming with .NET
Executive Bloggers
S. Somasegar
Brian Harry
Scott Guthrie
Jason Zander
Visual Studio
Visual Studio
Blend
LightSwitch
Line of Business Apps by Beth Massi
Setup & Install by Heath Stewart
Application Lifecycle Management
Visual Studio ALM
Team Foundation Service
Languages
Visual Basic
Visual C#
Visual C++
Visual F#
JavaScript
.NET Framework
.NET Framework
.NET Parallel Programming
ADO.NET (Managed Providers, DataSet & EF)
ASP.NET by Scott Hanselman
Base Class Library (BCL)
Silverlight
WCF Data Services
Workflow
Platform Development
Internet Explorer
Apps for Office and SharePoint 2013
SharePoint
Office
Web
Windows 8
Windows Store
Windows Azure
Windows Phone
Parallel Programming with .NET
All about Async/Await, System.Threading.Tasks, System.Collections.Concurrent, System.Linq, and more…
Subscribe
Comments
Home
Menu
Atom
Translate this page
Powered by
Microsoft® Translator
Recent Posts
.NET memory allocation profiling and Tasks
Posted
1 month ago
by
Stephen Toub - MSFT
5
Comments
Tasks, Monads, and LINQ
Posted
1 month ago
by
Stephen Toub - MSFT
9
Comments
"Invoke the method with await"... ugh!
Posted
2 months ago
by
Stephen Toub - MSFT
3
Comments
MVP Summit presentation on async
Posted
2 months ago
by
Stephen Toub - MSFT
5
Comments
Live Now on Developer Tools Blogs
Tags
.NET 4
.NET 4.5
Async
C++
Cancellation
Coordination Data Structures
Dataflow
F#
FAQ
Media
MSDN
Parallel Extensions
ParallelExtensionsExtras
Parallelism Blockers
PLINQ
Release
Silverlight
Talks
Task Parallel Library
ThreadPool
Tools
Visual Studio 2010
Related resources
Visual Studio Developer Center
Visual Studio Product Website
Archives
Archives
April 2013
(2)
March 2013
(1)
February 2013
(1)
January 2013
(2)
December 2012
(1)
November 2012
(1)
October 2012
(1)
September 2012
(2)
August 2012
(3)
June 2012
(2)
May 2012
(3)
April 2012
(6)
March 2012
(8)
February 2012
(14)
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)
More
▼
Less
▲
Tagged Content List
Blog Post:
Implementing Then with Await
Stephen Toub - MSFT
In a post a while ago, I talked about sequential composition of asynchronous operations . Now that we have the async/await keywords in C# and Visual Basic, such composition is trivial, and async/await are indeed the recommended way to achieve such composition with these languages. However, in that...
on
15 Aug 2012
Blog Post:
Async Targeting Pack for Visual Studio 11 now available for .NET 4 and Silverlight 5
Stephen Toub - MSFT
We’re happy to announce that you can now download an Async Targeting Pack for Visual Studio 11 that lets you target .NET 4 and Silverlight 5. The included DLLs address the previously discussed issue of the Visual Studio 11 Beta compilers being incompatible with the AsyncCtpLibrary* DLLs from the...
on
26 Apr 2012
Blog Post:
Implementing a simple ForEachAsync, part 2
Stephen Toub - MSFT
After my previous post , I received several emails and comments from folks asking why I chose to implement ForEachAsync the way I did. My goal with that post wasn’t to prescribe a particular approach to iteration, but rather to answer a question I’d received… obviously, however, I didn’t provide...
on
5 Mar 2012
Blog Post:
Implementing a simple ForEachAsync
Stephen Toub - MSFT
Jon Skeet recently asked me how I might go about implementing the following “asynchronous ForEach” behavior: For each element in an enumerable, run a function that returns a Task<TResult> to represent the completion of processing that element. All of these functions may run asynchronously concurrently...
on
4 Mar 2012
Blog Post:
"The Zen of Async" at the MVP Summit 2012
Stephen Toub - MSFT
Thanks to everyone who attended my "The Zen of Async" presentation on Thursday at the MVP Summit. As I've had several requests, here are the slides and code for the talk.
on
3 Mar 2012
Blog Post:
Paper :: Guide to Implementing Custom TPL Dataflow Blocks
Danny Shih
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 to implement a custom block for advanced scenarios...
on
5 Dec 2011
Blog Post:
Coalescing CancellationTokens from Timeouts
Stephen Toub - MSFT
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 a particular time interval, e.g. public...
on
3 Dec 2011
Blog Post:
New in .NET 4.5: ThreadLocal.Values
Igor Ostrovsky - MSFT
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...
on
10 Nov 2011
Blog Post:
PLINQ Queries That Run in Parallel in .NET 4.5
Igor Ostrovsky - MSFT
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 it believes will be faster. By default, PLINQ prefers...
on
10 Nov 2011
Blog Post:
Crafting a Task.TimeoutAfter Method
Joe Hoag
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 problems with other consumers of the Task. So...
on
10 Nov 2011
Blog Post:
Exception Handling in TPL Dataflow Networks
Cristina Manu
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 state, meaning that it is currently doing processing...
on
9 Nov 2011
Blog Post:
ConcurrentDictionary Performance Improvements in .NET 4.5
Igor Ostrovsky - MSFT
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...
on
8 Nov 2011
Blog Post:
Using Tasks to implement the APM Pattern
Stephen Toub - MSFT
Several times recently, folks have asked how to use tasks to implement the APM pattern, otherwise known as the Asynchronous Programming Model pattern, or the IAsyncResult pattern, or the Begin/End pattern. While moving forward we encourage folks to use a Task-based pattern for exposing asynchronous operation...
on
27 Jun 2011
Blog Post:
Processing Sequences of Asynchronous Operations with Tasks
Stephen Toub - MSFT
Of late, I’ve seen multiple folks asking about how to use tasks to asynchronously execute a sequence of operations. For example, given three synchronous functions: public string DoA(string input); public string DoB(string aResult); public string DoC(string bResult); you could invoke these functions...
on
21 Nov 2010
Blog Post:
FAQ :: TaskScheduler.UnobservedTaskException event doesn’t work?
Danny Shih
Recall that if exceptions thrown from Task bodies are left unobserved, they will be escalated. In .NET 4, this means that TPL will throw them on the finalizer after the Task objects are available for garbage collection. The UnobservedTaskException event on the TaskScheduler class was added as a last...
on
5 Aug 2010
Blog Post:
A TPL Sandbox
Danny Shih
In a previous post , we introduced the UnobservedTaskException event, saying that it would be useful for host-plugin scenarios where a host application should continue to execute in the presence of exceptions thrown by buggy plugins. A typical example is an Internet browser; should the entire application...
on
3 May 2010
Blog Post:
ParallelExtensionsExtras Tour - #14 - SingleItemPartitioner
Stephen Toub - MSFT
(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...
on
28 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #13 - AsyncCall
Stephen Toub - MSFT
(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...
on
27 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #11 - ParallelDynamicInvoke
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) Delegates in .NET may have one or more methods in their invocation list. When you invoke a delegate, such as through the Delegate.DynamicInvoke method, the net result is that all of the methods in the invocation list get invoked...
on
15 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #10 - Pipeline
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) Producer/consumer is a fundamental pattern employed in many parallel applications. With producer/consumer, one or more producer threads generate data that is consumed by one or more consumer threads. These consumers can themselves...
on
14 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #9 - ObjectPool<T>
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) An object pool is a mechanism/pattern to avoid the repeated creation and destruction of objects. When code is done with an object, rather than allowing it to be garbage collected (and finalized if it’s finalizable), you put...
on
13 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #8 - ReductionVariable<T>
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) The new .NET 4 System.Threading. ThreadLocal<T> is quite useful when you need per-thread, per-instance storage. This is in contrast to the fast ThreadStaticAttribute, which supports only per-thread storage (in .NET 4,...
on
12 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #7 - Additional TaskSchedulers
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) In our last two ParallelExtensionsExtras blog tour posts, we’ve discussed two TaskScheduler implementations in ParallelExtensionsExtras : StaTaskScheduler and ConcurrentExclusiveInterleave. These are just 2 of more than...
on
9 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #6 - ConcurrentExclusiveInterleave
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) As mentioned in the previous ParallelExtensionsExtras blog tour post , the Task Parallel Library (TPL) supports an extensible task scheduling mechanism, and we demonstrated how an StaTaskScheduler could be implemented that scheduled...
on
8 Apr 2010
Blog Post:
ParallelExtensionsExtras Tour - #5 - StaTaskScheduler
Stephen Toub - MSFT
(The full set of ParallelExtensionsExtras Tour posts is available here .) The Task Parallel Library (TPL) supports a wide array of semantics for scheduling tasks, even though it only includes two in the box (one using the ThreadPool, and one using SynchronizationContext, which exists primarily to...
on
7 Apr 2010
Page 1 of 3 (65 items)
1
2
3