Showing results for Async - .NET Parallel Programming

Mar 6, 2012
0
0

Are you using TPL Dataflow? We’d love to know!

Stephen Toub - MSFT
Stephen Toub - MSFT

Are you using the new System.Threading.Tasks.Dataflow.dll library, either from its CTPs 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 using TPL Dataflow in it?  Has the library ...

Parallel ExtensionsTask Parallel Library.NET 4
Mar 5, 2012
2
2

Implementing a simple ForEachAsync, part 2

Stephen Toub - MSFT
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 enough background. Let ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Mar 4, 2012
0
1

Implementing a simple ForEachAsync

Stephen Toub - MSFT
Stephen Toub - MSFT

Jon Skeet recently asked me how I might go about implementing the following “asynchronous ForEach” behavior: Given what we now know about SemaphoreSlim from my previous post, here’s one way to achieve this: public static Task ForEachAsync<TSource, TResult>(     this IEnumerable<TSource> ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Mar 3, 2012
0
0

“The Zen of Async” at the MVP Summit 2012

Stephen Toub - MSFT
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. Toub_MVPSummit2012_ZenOfAsync.zip...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 29, 2012
0
0

What’s New for Parallelism in .NET 4.5 Beta

Stephen Toub - MSFT
Stephen Toub - MSFT

At //BUILD/ in September, we blogged about the wealth of new support available for parallelism in the .NET Framework 4.5 Developer Preview.  Since then, we’ve been hard at work on the .NET 4.5 Beta.  With the beta just released, here are a few interesting and related things that are new or have changed since the Developer Preview ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 12, 2012
0
3

Building Async Coordination Primitives, Part 7: AsyncReaderWriterLock

Stephen Toub - MSFT
Stephen Toub - MSFT

In my last past, we looked at building an AsyncLock in terms of an AsyncSemaphore.  In this post, we’ll build a more advanced construct, an asynchronous reader/writer lock.An asynchronous reader/writer lock is more complicated than any of the previous coordination primitives we’ve created.  It also involves more policy, ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 12, 2012
0
3

Building Async Coordination Primitives, Part 6: AsyncLock

Stephen Toub - MSFT
Stephen Toub - MSFT

Last time, we looked at building an AsyncSemaphore.  Here, we’ll look at building support for an async mutual exclusion mechanism that supports scoping via ‘using’. As mentioned in the previous post, semaphores are great for throttling and resource management.  You can give a semaphore an initial count of the number of things to protect...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 12, 2012
1
1

Building Async Coordination Primitives, Part 5: AsyncSemaphore

Stephen Toub - MSFT
Stephen Toub - MSFT

In my last few posts, I covered building an AsyncManualResetEvent, an AsyncAutoResetEvent, an AsyncCountdownEvent, and an AsyncBarrier.  In this post, I’ll cover building an AsyncSemaphore class.Semaphores have a wide range of applicability.  They’re great for throttling, for protected access to a limited set of resources, and...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 11, 2012
0
2

Building Async Coordination Primitives, Part 4: AsyncBarrier

Stephen Toub - MSFT
Stephen Toub - MSFT

Last time, we looked at building an AsyncCountdownEvent.  At the end of the post, I highlighted a common pattern for using such a type, which is for all of the participants to signal and then wait for all of the other participants to signal as well.  This kind of synchronization is typically referred to as a “barrier,” and ...

Parallel ExtensionsTask Parallel Library.NET 4.5
Feb 11, 2012
0
3

Building Async Coordination Primitives, Part 2: AsyncAutoResetEvent

Stephen Toub - MSFT
Stephen Toub - MSFT

In my last post, I discussed building an asynchronous version of a manual-reset event.  This time, we’ll build an asynchronous version of an auto-reset event.A manual-reset event is transitioned to the signaled state when requested to do so (i.e. calling Set()), and then it remains in that state until it’s manually transitioned ...

Parallel ExtensionsTask Parallel Library.NET 4.5