.NET 4.5 Parallel Extensions Cookbook - Bryan Freeman

.NET 4.5 Parallel Extensions Cookbook

(Autor)

Buch | Softcover
336 Seiten
2013
Packt Publishing Limited (Verlag)
978-1-84969-022-5 (ISBN)
49,65 inkl. MwSt
  • Titel ist leider vergriffen;
    keine Neuauflage
  • Artikel merken
This book contains practical recipes on everything you will need to create task-based parallel programs using C#, .NET 4.5, and Visual Studio. The book is packed with illustrated code examples to create scalable programs.This book is intended to help experienced C# developers write applications that leverage the power of modern multicore processors. It provides the necessary knowledge for an experienced C# developer to work with .NET parallelism APIs. Previous experience of writing multithreaded applications is not necessary.

Bryan Freeman is a developer, architect, and writer on Parallel and Distributed Technologies.With over 15 years of experience delivering solutions across industry sectors such as healthcare,finance, and transportation,he specializes in technologies such as Microsoft .NET, Windows Communication Foundation, Windows Workflow,and Windows Azure to help clients deliver business value and drive revenue while reducing operational costs.As an active speaker, writer, and blogger, Bryan is a passionate community advocate for those who develop solutions based on .NET technologies. He is also an active member of the Scottsdale Institute and the Veterans of Foreign Wars.

Preface Chapter 1: Getting Started with Task Parallel Library Chapter 2: Implementing Continuations Chapter 3: Learning Concurrency with Parallel Loops Chapter 4: Parallel LINQ Chapter 5: Concurrent Collections Chapter 6: Synchronization Primitives Chapter 7: Profiling and Debugging Chapter 8: Async Chapter 9: Dataflow Library Index Preface Up Chapter 1: Getting Started with Task Parallel Library Introduction Creating a task Waiting for tasks to finish Returning results from a task Passing data to a task Creating a child task Lazy task execution Handling task exceptions using try/catch block Handling task exceptions with AggregateException.Handle Cancelling a task Cancelling one of many tasks Up Chapter 2: Implementing Continuations Introduction Continuing a task Passing task results to a continuation Continue "WhenAny" and "WhenAll" Specifying when a continuation will run Using a continuation for exception handling Cancelling a continuation Using a continuation to chain multiple tasks Using a continuation to update a UI Up Chapter 3: Learning Concurrency with Parallel Loops Introduction Creating a basic parallel for loop Creating a basic parallel foreach loop Breaking a parallel loop Stopping a parallel loop Cancelling a parallel loop Handling exceptions in a parallel loop Controlling the degree of parallelism in a loop Partitioning data in a parallel loop Using Thread Local Storage Up Chapter 4: Parallel LINQ Introduction Creating a basic parallel query Preserving order in parallel LINQ Forcing parallel execution Limiting parallelism in a query Processing query results Specifying merge options Range projection with parallel LINQ Handling exceptions in parallel LINQ Cancelling a parallel LINQ query Performing reduction operations Creating a custom partitioner Up Chapter 5: Concurrent Collections Introduction Adding and removing items to BlockingCollection Iterating a BlockingCollection with GetConsumingEnumerable Performing LIFO operations with ConcurrentStack Thread safe data lookups with ConcurrentDictionary Cancelling an operation in a concurrent collection Working with multiple producers and consumers Creating object pool with ConcurrentStack Adding blocking and bounding with IProducerConsumerCollection Using multiple concurrent collections to create a pipeline Up Chapter 6: Synchronization Primitives Introduction Using monitor Using a mutual exclusion lock Using SpinLock for synchronization Interlocked operations Synchronizing multiple tasks with a Barrier Using ReaderWriterLockSlim Using WaitHandles with Mutex Waiting for multiple threads with CountdownEvent Using ManualResetEventSlim to spin and wait Using SemaphoreSlim to limit access Up Chapter 7: Profiling and Debugging Introduction Using the Threads and Call Stack windows Using the Parallel Stacks window Watching values in a thread with Parallel Watch window Detecting deadlocks with the Parallel Tasks window Measure CPU utilization with Concurrency Visualizer Using Concurrency Visualizer Threads view Using Concurrency Visualizer Cores view Up Chapter 8: Async Introduction Creating an async method Handling Exceptions in asynchronous code Cancelling an asynchronous operation Cancelling async operation after timeout period Processing multiple async tasks as they complete Improving performance of async solution with Task.WhenAll Using async for file access Checking the progress of an asynchronous task Up Chapter 9: Dataflow Library Introduction Reading from and writing to a dataflow block synchronously Reading from and writing to a dataflow block asynchronously Implementing a producer-consumer dataflow pattern Creating a dataflow pipeline Cancelling a dataflow block Specifying the degree of parallelism Unlink dataflow blocks How it works Using JoinBlock to read from multiple data sources

Erscheint lt. Verlag 26.7.2013
Verlagsort Birmingham
Sprache englisch
Maße 191 x 235 mm
Themenwelt Informatik Programmiersprachen / -werkzeuge NET Programmierung
ISBN-10 1-84969-022-7 / 1849690227
ISBN-13 978-1-84969-022-5 / 9781849690225
Zustand Neuware
Haben Sie eine Frage zum Produkt?
Mehr entdecken
aus dem Bereich
Grundlagen, Profiwissen und Rezepte

von Jürgen Kotz; Christian Wenz

Buch (2024)
Carl Hanser (Verlag)
49,99