Parallel Programming with C# and .NET Core: Developing Multithreaded Applications Using C# and .NET Core 3.1 from Scratch
- Length: 394 pages
- Edition: 1
- Language: English
- Publisher: BPB Publications
- Publication Date: 2020-06-26
- ISBN-10: 9389423325
- ISBN-13: 9789389423327
- Sales Rank: #3149603 (See Top 100 Books)
Learn, understand, and code parallel programs with confidence using C# 8 and .NET Core 3.0
Key Features
- Explore and work with the new features and enhancements in .NET Core 3.0 & C# 8
- Understand the fundamentals of parallel programming
- Learn various threading patterns and synchronization constructs
- Build concurrent applications using C# and .Net Core 3.0 from the ground up
- Understand the principles of unit testing and debugging in concurrent applications
Description
Application development has evolved over the last decade, and with the advent of the latest technologies like Angular, React on client-side, and ASP.NET Core, Spring on the server-side, the consumer expectations have risen like never before.
The primary objective of this book is to help readers understand the importance of asynchronous programming and various ways it can be achieved using .NET Core 3.1 and C# 8 to successfully build concurrent applications. Along the way reader will learn the fundamentals of threading, asynchronous programming, various asynchronous patterns, synchronisation constructs, unit testing parallel methods, debugging enterprise applications, and cool tips and tricks.
There are samples based on practical examples that will help the reader effectively use parallel programming. By the end of this book, you will be equipped with all the knowledge needed to understand, code, and debug multithreaded, concurrent and parallel programs with confidence.
What will you learn
- Understand the internals of async/await.
- Learn how to build applications using async/await.
- Write unit tests for asynchronous methods.
- Explore various debugging techniques for enterprise applications.
Who this book is for
Beginners and intermediate developers who build enterprise applications using .NET Core platform and tools. Advanced users can also use this book for brushing up fundamentals and for learning debugging tools, techniques, tips, and tricks.
Cover Page Title Page Copyright Page Dedication About the Authors Acknowledgements Preface Errata Table of Contents 1. Getting Started Structure Objective Download essential tools for Windows Installing Visual Studio 2019 with .NET Core 3.1 Perfmon Procmon Process Explorer PerfView JustDecompile DebugDiag WinDbg Creating a .NET Core 3.1 application using Visual Studio 2019 Summary Exercise 2. What’s New in C# 8? Structure Objective C# 8 platform dependencies New features and enhancements Nullable reference types/Non-nullable reference type Asynchronous streams Ranges and indices System.Index System.Range Default implementations of interface members Readonly members on structs Pattern matching enhancements Switch expressions Recursive patterns Positional pattern Property pattern Tuple patterns Using declarations Static local functions Disposable ref structs Null-coalescing assignment Interpolated verbatim strings enhancement Summary Exercise 3. .NET Core 3.1 Introduction Structure Objective New features and enhancements NET Core version APIs Windows Desktop application support Windows Desktop Deployment MSIX COM-callable components – Windows Desktop WinForms high DPI .NET Standard 2.1 C# 8 and its new features support Compile and Deploy Default executable Single executable file Assembly linking Tiered compilation ReadyToRun images Cross-platform/architecture restrictions Runtime/SDK Build copies dependencies Local tools Smaller Garbage Collection heap sizes Garbage Collection Large Page supports Opt-in feature IEEE Floating-point improvements Built-in JSON support Json Reader Json Writer Json Serializer HTTP/2 support Cryptographic Key Import and Export Summary Exercise 4. Demystifying Threading Structure Objectives Why threading? What is threading? Thread Exception handling Limitations ThreadPool Exceptions in ThreadPool Limitations of Thread Pool ThreadPool in action Task TaskCreationOptions Exception handling with Tasks Cancellation Continuations WhenAll, WhenAny Task Scheduler Task Factory Summary Exercise 5. Parallel Programming Structure Objectives Understanding the jargon Parallel Extensions Task Parallel Library (TPL) Data parallelism Task parallelism PLINQ Data structures for parallelism IEnumerator and yield return async await async await – Control flow async await – Under the hood Language features Principles for using async await Restrictions on async await CPU (compute) bound versus I/O bound work Deadlock Asynchronous Streams ValueTask Summary Exercise 6. The Threading Patterns Introduction Structure Objectives Task-based Asynchronous Pattern (TAP) Implementing pattern CPU bound versus I/O bound Exception handling Nested exception handling Exception handling in Task.Wait() Using the handle method Avoid async void Cancellation Progress reporting Other asynchronous patterns Asynchronous Programming Model (APM) APM to TAP wrapper TAP to APM wrapper Event-based Asynchronous Pattern (EAP) EAP to TAP wrapper Summary Exercise 7. Synchronization Constructs Structure Objectives Overview Thread safety Locking constructs Lock or Monitor.Enter/Monitor.Exit (Exclusive) Mutex (Exclusive) SpinLock (Exclusive) Semaphore (Non-Exclusive) SemaphoreSlim (Non-exclusive) Reader/Writer locks (Non-Exclusive) Signaling constructs AutoResetEvent ManualResetEvent/ManualResetEventSlim CountdownEvent Barrier classes Wait and Pulse Interlocked class Volatile class Summary Exercise 8. Unit Testing Parallel and Asynchronous Programs Structure Objectives Overview Basics of unit testing with XUnit Executing unit tests IntelliTest Live Unit Testing Unit test async methods Unit test exceptions in async methods Unit test async method using mock data Unit test for parallel methods Unit test async void methods Summary Exercise 9. Debugging and Troubleshooting Structure Objectives Debugging primer with Visual Studio 2019 Profiling Memory Dumps Collecting memory dumps Analyzing memory dumps Fixing Performance analysis with PerfView Summary Exercise 10. Tips and Tricks Structure Objectives Tips and tricks Threading and TPL async await ASP.NET Core Threading Patterns Synchronization Testing Debugging Azure Summary
Donate to keep this site alive
1. Disable the AdBlock plugin. Otherwise, you may not get any links.
2. Solve the CAPTCHA.
3. Click download link.
4. Lead to download server to download.