Sign in
MSDN Blogs
Microsoft Blog Images
More ...
Browse by Tags
MSDN Blogs
>
.NET Parallel Programming
>
All Tags
>
.net 4
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
3 months ago
by
Stephen Toub - MSFT
5
Comments
Live Now on Developer Tools Blogs
Tags
.NET 4.5
Article Summary
Async
C++
Cancellation
Code Samples
Coordination Data Structures
Dataflow
Debugging
F#
FAQ
Feedback Requested
Message Passing
New Feature?
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:
C# memory model articles
Stephen Toub - MSFT
Igor Ostrovsky is one of the minds behind the parallel programming support in the .NET Framework. Igor's recently written a great set of articles for MSDN Magazine to cover " The C# Memory Model in Theory and Practice ". Part 1 is available now in the December 2012 issue , and it's a great read.
on
14 Dec 2012
Blog Post:
PLINQ and Int32.MaxValue
Stephen Toub - MSFT
In both .NET 4 and .NET 4.5, PLINQ supports enumerables with up to Int32.MaxValue elements. Beyond that limit, PLINQ will throw an overflow exception. LINQ to Objects itself has this limitation with certain query operators (such as the indexed Select operator which counts the elements processed...
on
16 Nov 2012
Blog Post:
New TaskCreationOptions and TaskContinuationOptions in .NET 4.5
Stephen Toub - MSFT
Astute users of the Task Parallel Library might have noticed three new options available across TaskCreationOptions and TaskContinuationOptions in .NET 4.5: DenyChildAttach, HideScheduler, and (on TaskContinuationOptions) LazyCancellation. I wanted to take a few minutes to share more about what...
on
22 Sep 2012
Blog Post:
ExecutionContext vs SynchronizationContext
Stephen Toub - MSFT
I’ve been asked a few times recently various questions about ExecutionContext and SynchronizationContext, for example what the differences are between them, what it means to “flow” them, and how they relate to the new async/await keywords in C# and Visual Basic. I thought I’d try to tackle some...
on
15 Jun 2012
Blog Post:
ConcurrentQueue<T> holding on to a few dequeued elements
Stephen Toub - MSFT
Since .NET 4’s release, I’ve received several questions about a peculiar behavior of ConcurrentQueue<T> having to do with memory management. With Queue<T>, List<T>, and other such data structures in the .NET Framework, when you remove an element from the collection, the collection internally...
on
8 May 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:
Should I expose synchronous wrappers for asynchronous methods?
Stephen Toub - MSFT
In a previous post Should I expose asynchronous wrappers for synchronous methods? , I discussed “async over sync,” the notion of using synchronous functionality asynchronously and the benefits that doing so may or may not yield. The other direction of “sync over async” is also interesting to explore...
on
13 Apr 2012
Blog Post:
Do I need to dispose of Tasks?
Stephen Toub - MSFT
I get this question a lot: “Task implements IDisposable and exposes a Dispose method. Does that mean I should dispose of all of my tasks?” Summary Here’s my short answer to this question: “No. Don’t bother disposing of your tasks.” Here’s my medium-length answer: “No. Don’t bother disposing...
on
25 Mar 2012
Blog Post:
Should I expose asynchronous wrappers for synchronous methods?
Stephen Toub - MSFT
Lately I’ve received several questions along the lines of the following, which I typically summarize as “async over sync”: In my library, I have a method “public T Foo();”. I’m considering exposing an asynchronous method that would simply wrap the synchronous one, e.g. “public Task<T> FooAsync...
on
24 Mar 2012
Blog Post:
Is it ok to use nested Parallel.For loops?
Stephen Toub - MSFT
Every now and then, I get this question: “is it ok to use nested Parallel.For loops?” The short answer is “yes.” As is often the case, the longer answer is, well, longer. Typically when folks ask this question, they’re concerned about one of two things. First, they’re concerned that each...
on
14 Mar 2012
Blog Post:
Are you using TPL Dataflow? We’d love to know!
Stephen Toub - MSFT
Are you using the new System.Threading.Tasks.Dataflow.dll library, either from its CTP s or from the .NET 4.5 Developer Preview or Beta? We'd love to hear about it, and if you have time, what your experiences have been (good or bad). What kind of solution are you building, and how are you...
on
6 Mar 2012
Blog Post:
When “ExecuteSynchronously” doesn’t execute synchronously
Stephen Toub - MSFT
When creating a task continuation with ContinueWith, developers have the opportunity to provide a TaskContinuationOptions enum value, which could include the TaskContinuationOptions.ExecuteSynchronously flag. ExecuteSynchronously is a request for an optimization to run the continuation task on...
on
7 Feb 2012
Blog Post:
FromAsync(asyncResult, …) vs FromAsync(beginMethod, …)
Stephen Toub - MSFT
The Task Parallel Library (TPL) provides a set of “ FromAsync ” helper methods that create a Task or a Task<TResult> to represent an invocation of an APM method pair, i.e. BeginXx / EndXx. There are, however, two different flavors among these overloads: ones that accept an IAsyncResult “asyncResult...
on
6 Feb 2012
Blog Post:
Building a custom GetOrAdd method for ConcurrentDictionary<TKey,TValue>
Stephen Toub - MSFT
I was recently asked by a developer about getting some additional information out of ConcurrentDictionary<TKey,TValue>’s GetOrAdd method. As a reminder, GetOrAdd either returns the value for a key currently in the dictionary, or if that key doesn’t have a value, it adds a value for the key...
on
4 Feb 2012
Blog Post:
Know Thine Implicit Allocations
Stephen Toub - MSFT
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 used in async programming and at a foundational level...
on
3 Feb 2012
Blog Post:
Await, SynchronizationContext, and Console Apps: Part 2
Stephen Toub - MSFT
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 UI frameworks like Windows Forms and Windows Presentation...
on
21 Jan 2012
Blog Post:
Implementing a SynchronizationContext.SendAsync method
Stephen Toub - MSFT
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 delegate and object state to be executed according...
on
20 Jan 2012
Blog Post:
FAQ on Task.Start
Stephen Toub - MSFT
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 is and what it does. 1. Question: When can I use Task...
on
14 Jan 2012
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:
Updated Async CTP
Stephen Toub - MSFT
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. And there have been multiple patches to Visual...
on
1 Nov 2011
Blog Post:
Task.Run vs Task.Factory.StartNew
Stephen Toub - MSFT
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 behaviors. The flip side of all of this...
on
24 Oct 2011
Blog Post:
Don’t Forget To Complete Your Tasks
Stephen Toub - MSFT
“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 of the imperative. Tasks represent a promise...
on
2 Oct 2011
Blog Post:
Updated TPL Dataflow CTP
Stephen Toub - MSFT
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 “ What’s New for Parallelism in .NET...
on
27 Sep 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
Page 1 of 5 (121 items)
1
2
3
4
5