Showing tag results for Task Parallel Library

May 4, 2010
Post comments count0
Post likes count0

ParallelExtensionsExtras Tour – #15 – Specialized Task Waiting

Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)The Task Parallel Library provides the Task.Wait method, which synchronously waits for the target Task to complete.  If the Task completed successfully, the method simply returns.  If the Task completed due to an unhandled exception or cancellation, Wait throws an app...

.NET Parallel Programming
May 3, 2010
Post comments count0
Post likes count0

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 crash if some rich content plugin crash...

.NET Parallel Programming
Apr 28, 2010
Post comments count0
Post likes count0

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 and PLINQ, as it allows the develope...

.NET Parallel Programming
Apr 27, 2010
Post comments count0
Post likes count0

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 they're alerted to data being available and only then ...

.NET Parallel Programming
Apr 23, 2010
Post comments count0
Post likes count0

ParallelExtensionsExtras Tour – #12 – AsyncCache

Stephen Toub - MSFT

(The full set of ParallelExtensionsExtras Tour posts is available here.)Caches are ubiquitous in computing, serving as a staple of both hardware architecture and software development.  In software, caches are often implemented as dictionaries, where some data is retrieved or computed based on a key, and then that key and its resulting data/val...

.NET Parallel Programming
Apr 21, 2010
Post comments count0
Post likes count0

When To Use Parallel.ForEach and When to Use PLINQ

Igor Ostrovsky - MSFT

If you've played around with PLINQ and Parallel.ForEach loops in .NET 4, you may have noticed that many PLINQ queries can be rewritten as parallel loops, and also many parallel loops can be rewritten as PLINQ queries. However, both parallel loops and PLINQ have distinct advantages in different situations. When writing ...

.NET Parallel Programming
Apr 19, 2010
Post comments count0
Post likes count0

A Tour of Various TPL Options

Igor Ostrovsky - MSFT

The Task Parallel Library (TPL) exposes various options that give you more control over how tasks get scheduled and executed: Joseph E. Hoag's article A Tour of Various TPL Options explains these options in detail, accompanied by examples of correct and incorrect uses.(This paper and many more are available through the Parallel Computing D...

.NET Parallel Programming
Apr 9, 2010
Post comments count0
Post likes count0

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 10 schedulers in ParallelExtensionsExtras, and ...

.NET Parallel Programming
Apr 8, 2010
Post comments count0
Post likes count0

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 tasks onto custom STA threa...

.NET Parallel Programming
Apr 7, 2010
Post comments count0
Post likes count0

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 run tasks on UI threads).  This ...

.NET Parallel Programming