Browse by Tags

Tagged Content List
  • Blog Post: Processing Sequences of Asynchronous Operations with Tasks

    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...
  • Blog Post: ParallelExtensionsExtras Tour - #16 - Async Tasks for WebClient, SmtpClient, and Ping

    (The full set of ParallelExtensionsExtras Tour posts is available here .) The Task Parallel Library isn’t just about CPU-bound operations. The Task class is a great representation for any asynchronous operation, even those implemented purely as asynchronous I/O. Task’s ability...
  • Blog Post: ParallelExtensionsExtras Tour - #15 - Specialized Task Waiting

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #14 - SingleItemPartitioner

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #13 - AsyncCall

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #12 - AsyncCache

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #11 - ParallelDynamicInvoke

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #10 - Pipeline

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #9 - ObjectPool<T>

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #8 - ReductionVariable<T>

    (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,...
  • Blog Post: ParallelExtensionsExtras Tour - #7 - Additional TaskSchedulers

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #6 - ConcurrentExclusiveInterleave

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #5 - StaTaskScheduler

    (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...
  • Blog Post: ParallelExtensionsExtras Tour - #4 - BlockingCollectionExtensions

    (The full set of ParallelExtensionsExtras Tour posts is available here .) BlockingCollection<T> encapsulates the core synchronization and coordination necessary to enable classic producer/consumer patterns. ParallelExtensionsExtras provides the BlockingCollectionExtensions.cs file, which contains...
  • Blog Post: ParallelExtensionsExtras Tour - #3 - Additional Task Extensions Methods

    (The full set of ParallelExtensionsExtras Tour posts is available here .) In our last ParallelExtensionsExtras tour post , we discussed implementing an extension ToObservable method for Task<TResult>. This is just one of a myriad of extra pieces of functionality that are useful with Tasks, and...
  • Blog Post: ParallelExtensionsExtras Tour - #2 - Task<TResult>.ToObservable

    (The full set of ParallelExtensionsExtras Tour posts is available here .) In our previous ParallelExtensionsExtras tour post , we discussed a custom implementation of the LINQ operators, in particular for working with Task<TResult> instances in an asynchronous manner. There is already an impressive...
  • Blog Post: ParallelExtensionsExtras Tour - #1 - LINQ to Tasks

    (The full set of ParallelExtensionsExtras Tour posts is available here .) The .NET Framework developer center provides a concise description of Language Integrated Query (LINQ): LINQ is a set of extensions to the .NET Framework that encompass language-integrated query, set, and transform operations...
  • Blog Post: A Tour of ParallelExtensionsExtras

    Throughout the development of Parallel Extensions for the .NET Framework 4, we’ve come across a myriad of situations where certain functionality would be useful in developing a particular application or library, but where that functionality isn’t quite encapsulated in the bits we’re...
Page 1 of 1 (18 items)