Cargando…

Parallel programming and concurrency with C# 10 and .NET 6 : a modern approach to building faster, more responsive, and asynchronous . NET applications using C# /

Leverage the latest parallel and concurrency features in .NET 6 when building your next application and explore the benefits and challenges of asynchrony, parallelism, and concurrency in .NET via practical examples Key Features Learn to implement parallel programming and handle concurrency in .NET e...

Descripción completa

Detalles Bibliográficos
Clasificación:Libro Electrónico
Autor principal: Ashcraft, Alvin (Autor)
Formato: Electrónico eBook
Idioma:Inglés
Publicado: Birmingham : Packt Publishing, Limited, 2022.
Temas:
Acceso en línea:Texto completo (Requiere registro previo con correo institucional)
Tabla de Contenidos:
  • Cover
  • Title Page
  • Copyright and Credits
  • Contributors
  • Table of Contents
  • Preface
  • Part 1: Introduction to Threading in .NET
  • Chapter 1: Managed Threading Concepts
  • Technical requirements
  • NET threading basics
  • Threads and processes
  • When should we use multithreading in .NET?
  • Background threads
  • What is managed threading?
  • Creating and destroying threads
  • Creating managed threads
  • Pausing thread execution
  • Destroying managed threads
  • Handling threading exceptions
  • Synchronizing data across threads
  • Synchronizing code regions
  • Manual synchronization
  • Scheduling and canceling work
  • Scheduling managed threads
  • Canceling managed threads
  • Summary
  • Questions
  • Chapter 2: Evolution of Multithreaded Programming in .NET
  • Technical requirements
  • NET threading through the years
  • C# 4 and .NET Framework 4.0
  • C# 5 and 6 and .NET Framework 4.5.x
  • C# 7.x and .NET Core 2.0
  • C# 8 and .NET Core 3.0
  • C# 10 and .NET 6
  • Beyond threading basics
  • Managed thread pool
  • Threading and timers
  • Introduction to parallelism
  • Using Parallel. Invoke
  • Using Parallel. ForEach
  • Basics of Parallel LINQ
  • Introduction to concurrency
  • ConcurrentBag
  • ConcurrentQueue
  • ConcurrentStack
  • BlockingCollection
  • ConcurrentDictionary
  • Basics of async and await
  • Understanding the async keyword
  • Writing an async method
  • Choosing the right path forward
  • Summary
  • Questions
  • Chapter 3: Best Practices for Managed Threading
  • Technical requirements
  • Handling static objects
  • Static data and constructors
  • Controlling shared access to static objects
  • Managing deadlocks and race conditions
  • Mitigating deadlocks
  • Avoiding race conditions
  • Threading limits and other recommendations
  • Summary
  • Questions
  • Chapter 4: User Interface Responsiveness and Threading
  • Technical requirements
  • Leveraging background threads
  • Which threads are background threads?
  • Using async, await, tasks, and WhenAll
  • Using the thread pool
  • Updating the UI thread without exceptions
  • Summary
  • Questions
  • Part 2: Parallel Programming and Concurrency with C#
  • Chapter 5: Asynchronous Programming with C#
  • Technical requirements
  • More about asynchronous programming in .NET
  • I/O-bound operations
  • CPU-bound operations
  • Nested async methods
  • Working with Task objects
  • Exploring Task methods
  • Exploring Task properties
  • Interop with synchronous code
  • Executing async from synchronous methods
  • Executing synchronous code as async
  • Working with multiple background tasks
  • Asynchronous programming best practices
  • Summary
  • Questions
  • Chapter 6: Parallel Programming Concepts
  • Technical requirements
  • Getting started with the TPL
  • I/O-bound operations
  • CPU-bound operations
  • Parallel loops in .NET
  • Basic Parallel. For loops
  • Parallel loops with thread-local variables