+612 9045 4394
 
CHECKOUT
.Net 4.5 Parallel Extensions - Bryan Freeman

.Net 4.5 Parallel Extensions

Paperback Published: 18th June 2013
ISBN: 9781849690225
Number Of Pages: 336

Share This Book:
Ships in 7 to 10 business days

Earn 138 Qantas Points
on this Book

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.

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

ISBN: 9781849690225
ISBN-10: 1849690227
Audience: General
Format: Paperback
Language: English
Number Of Pages: 336
Published: 18th June 2013
Country of Publication: GB
Dimensions (cm): 23.5 x 19.1  x 1.78
Weight (kg): 0.58

Earn 138 Qantas Points
on this Book