C# Multithreaded and Parallel Programming

Rodney Ringler

  • 出版商: Packt Publishing
  • 出版日期: 2014-12-27
  • 售價: $1,980
  • 貴賓價: 9.5$1,881
  • 語言: 英文
  • 頁數: 344
  • 裝訂: Paperback
  • ISBN: 184968832X
  • ISBN-13: 9781849688321
  • 相關分類: C#
  • 下單後立即進貨 (約3~4週)

商品描述

Develop powerful C# applications to take advantage of today's multicore hardware

About This Book

  • Make use of the latest Visual Studio debugging tools, to manage and debug multiple threads running simultaneously
  • Learn how to use the Thread, Task, and Parallel libraries in your C# applications
  • Explore the evolution of multithreaded development in C#, starting with BackgroundWorker classes and moving on to threads and tasks and finally covering Async

Who This Book Is For

If you are a C# developer and want to learn how to take advantage of the features of .NET for concurrent and multithreaded applications, then this book is for you. If you are already comfortable with C# but want to learn more about parallel design patterns, threads, tasks, and async, then look no further!

What You Will Learn

  • Explore all the essential methods used for programming multithreaded applications
  • Enhance the performance of an application by designing various parallel operations to achieve concurrency
  • Build powerful applications using the Task Parallel Library (TPL), which makes concurrent processing of items in a data collection simple
  • Implement data parallelism using the Parallel library, concurrent collections, and PLINQ
  • Debug your multithreaded applications using the Threads view, Tasks window, Parallel Stacks window, and Parallel Watch window
  • Accomplish any given parallel task using two of the most popular parallel patterns for development: Pipelining and producer-consumer
  • Get to grips with the Asynchronous Programming Model (APM) to learn to begin and end asynchronous operations

In Detail

Most modern machines have dual-core processors. This means that the present-day computer has the ability to multitask. Using multiple cores means your applications can process data faster and be more responsive to users. However, to fully exploit this in your applications, you need to write multithreading code.

We will begin by covering some techniques that have been around since the beginning of .NET, including the BackgroundWorker component, timers, and the Thread class. We will use tasks, task factories, and parallel loops to develop multithreaded applications at a higher level than directly creating and managing individual threads. Finally, we will look at the tools Visual Studio provides for debugging parallel applications, common concurrent design patterns, and the latest updates in PLINQ and async.

商品描述(中文翻譯)

開發強大的 C# 應用程式,以充分利用當今的多核心硬體

關於本書
- 利用最新的 Visual Studio 除錯工具,管理和除錯同時運行的多個執行緒
- 學習如何在 C# 應用程式中使用 Thread、Task 和 Parallel 函式庫
- 探索 C# 中多執行緒開發的演變,從 BackgroundWorker 類別開始,進而了解執行緒和任務,最後涵蓋 Async

本書適合誰
如果您是 C# 開發人員,並希望學習如何利用 .NET 的特性來開發並行和多執行緒應用程式,那麼這本書適合您。如果您已經對 C# 感到熟悉,但想進一步了解平行設計模式、執行緒、任務和非同步,那麼這本書就是您的最佳選擇!

您將學到什麼
- 探索用於編寫多執行緒應用程式的所有基本方法
- 通過設計各種平行操作來增強應用程式的性能,以實現並行處理
- 使用任務平行函式庫 (Task Parallel Library, TPL) 構建強大的應用程式,簡化數據集合中項目的並行處理
- 使用 Parallel 函式庫、並行集合和 PLINQ 實現數據平行處理
- 使用 Threads 視圖、Tasks 窗口、Parallel Stacks 窗口和 Parallel Watch 窗口來除錯您的多執行緒應用程式
- 使用兩種最受歡迎的平行開發模式:管道化 (Pipelining) 和生產者-消費者模式 (producer-consumer) 來完成任何給定的平行任務
- 熟悉非同步編程模型 (Asynchronous Programming Model, APM),學習如何開始和結束非同步操作

詳細內容
大多數現代機器都配備雙核心處理器。這意味著當今的電腦具備多任務處理的能力。使用多核心意味著您的應用程式可以更快地處理數據,並對用戶的反應更加靈敏。然而,要充分利用這一點,您需要編寫多執行緒代碼。

我們將首先介紹一些自 .NET 開始就存在的技術,包括 BackgroundWorker 元件、計時器和 Thread 類別。我們將使用任務、任務工廠和並行迴圈,以比直接創建和管理單個執行緒更高的層次來開發多執行緒應用程式。最後,我們將探討 Visual Studio 提供的用於除錯平行應用程式的工具、常見的並行設計模式,以及 PLINQ 和非同步的最新更新。