Mastering C# Concurrency

Eugene Agafonov, Andrew Koryavchenko

  • 出版商: Packt Publishing
  • 出版日期: 2015-10-30
  • 售價: $2,200
  • 貴賓價: 9.5$2,090
  • 語言: 英文
  • 頁數: 284
  • 裝訂: Paperback
  • ISBN: 178528665X
  • ISBN-13: 9781785286650
  • 相關分類: C#
  • 海外代購書籍(需單獨結帳)

買這商品的人也買了...

商品描述

Create robust and scalable applications along with responsive UI using concurrency and the multi-threading infrastructure in .NET and C#

About This Book

  • Learn to combine your asynchronous operations with Task Parallel Library
  • Master C#'s asynchronous infrastructure and use asynchronous APIs effectively to achieve optimal responsiveness of the application
  • An easy-to-follow, example-based guide that helps you to build scalable applications using concurrency in C#

Who This Book Is For

If you are a C# developer who wants to develop modern applications in C# and wants to overcome problems by using asynchronous APIs and standard patterns, then this book is ideal for you. Reasonable development knowledge, an understanding of core elements and applications related to the .Net platform, and also the fundamentals of concurrency is assumed.

What You Will Learn

  • Apply general multithreading concepts to your application's design
  • Leverage lock-free concurrency and learn about its pros and cons to achieve efficient synchronization between user threads
  • Combine your asynchronous operations with Task Parallel Library
  • Make your code easier with C#'s asynchrony support
  • Use common concurrent collections and programming patterns
  • Write scalable and robust server-side asynchronous code
  • Create fast and responsible client applications
  • Avoid common problems and troubleshoot your multi-threaded and asynchronous applications

In Detail

Starting with the traditional approach to concurrency, you will learn how to write multithreaded concurrent programs and compose ways that won't require locking. You will explore the concepts of parallelism granularity, and fine-grained and coarse-grained parallel tasks by choosing a concurrent program structure and parallelizing the workload optimally. You will also learn how to use task parallel library, cancellations, timeouts, and how to handle errors. You will know how to choose the appropriate data structure for a specific parallel algorithm to achieve scalability and performance. Further, you'll learn about server scalability, asynchronous I/O, and thread pools, and write responsive traditional Windows and Windows Store applications.

By the end of the book, you will be able to diagnose and resolve typical problems that could happen in multithreaded applications.

Style and approach

An easy-to-follow, example-based guide that will walk you through the core principles of concurrency and multithreading using C#.

商品描述(中文翻譯)

使用 .NET 和 C# 中的並行性和多線程基礎創建強大且可擴展的應用程序,並搭配響應式 UI

關於本書



  • 學習將異步操作與任務平行庫結合使用

  • 掌握 C# 的異步基礎架構,並有效地使用異步 API 實現應用程序的最佳響應性

  • 一本易於跟隨的基於實例的指南,幫助您使用 C# 中的並行性構建可擴展的應用程序

本書適合對象


如果您是一位 C# 開發人員,想要在 C# 中開發現代應用程序,並希望通過使用異步 API 和標準模式來解決問題,那麼本書非常適合您。我們假設您具備合理的開發知識,了解與 .Net 平台相關的核心元素和應用程序,以及並行性的基礎知識。

您將學到什麼



  • 將一般的多線程概念應用於應用程序的設計

  • 利用無鎖並行性,了解其優點和缺點,實現用戶線程之間的高效同步

  • 將異步操作與任務平行庫結合使用

  • 使用 C# 的異步支持使代碼更加簡潔

  • 使用常見的並行集合和編程模式

  • 編寫可擴展且堅固的服務器端異步代碼

  • 創建快速且響應靈敏的客戶端應用程序

  • 避免常見問題,並解決多線程和異步應用程序的故障

詳細內容


從傳統的並行性方法開始,您將學習如何編寫多線程並發程序,並以不需要鎖定的方式組合方法。您將通過選擇並行程序結構並最佳地並行化工作負載,探索並行性粒度、細粒度和粗粒度並行任務的概念。您還將學習如何使用任務平行庫、取消、超時以及如何處理錯誤。您將了解如何為特定的並行算法選擇適當的數據結構,以實現可擴展性和性能。此外,您還將學習有關服務器可擴展性、異步 I/O 和線程池的知識,並編寫響應靈敏的傳統 Windows 和 Windows Store 應用程序。


通過本書,您將能夠診斷和解決多線程應用程序中可能發生的典型問題。

風格和方法


這是一本易於跟隨的基於實例的指南,將引導您通過使用 C# 來理解並行性和多線程的核心原則。