29,99 €
.NET has included managed threading capabilities since the beginning, but early techniques had inherent risks: memory leaks, thread synchronization issues, and deadlocks. This book will help you avoid those pitfalls and leverage the modern constructs available in .NET 6 and C# 10, while providing recommendations on patterns and best practices for parallelism and concurrency. Parallel, concurrent, and asynchronous programming are part of every .NET application today, and it becomes imperative for modern developers to understand how to effectively use these techniques.
This book will teach intermediate-level .NET developers how to make their applications faster and more responsive with parallel programming and concurrency in .NET and C# with practical examples. The book starts with the essentials of multi-threaded .NET development and explores how the language and framework constructs have evolved along with .NET. You will later get to grips with the different options available today in .NET 6, followed by insights into best practices, debugging, and unit testing.
By the end of this book, you will have a deep understanding of why, when, and how to employ parallelism and concurrency in any .NET application.
Das E-Book können Sie in Legimi-Apps oder einer beliebigen App lesen, die das folgende Format unterstützen:
Seitenzahl: 314
Veröffentlichungsjahr: 2022
A modern approach to building faster, more responsive, and asynchronous .NET applications using C#
Alvin Ashcraft
BIRMINGHAM—MUMBAI
Copyright © 2022 Packt Publishing
All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews.
Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing or its dealers and distributors, will be held liable for any damages caused or alleged to have been caused directly or indirectly by this book.
Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information.
Associate Group Product Manager: Gebin George
Publishing Product Manager: Sathyanarayanan Ellapulli
Senior Editor: Ruvika Rao
Content Development Editor: Yashi Gupta
Technical Editor: Maran Fernandes
Copy Editor: Safis Editing
Project Coordinator: Manisha Singh
Proofreader: Safis Editing
Indexer: Hemangini Bari
Production Designer: Roshan Kawale
Marketing Coordinator: Sonakshi Bubbar
First published: August 2022
Production reference: 1120822
Published by Packt Publishing Ltd.
Livery Place
35 Livery Street
Birmingham
B3 2PB, UK.
ISBN 978-1-80324-367-2
www.packt.com
To my wife, Stelene, for supporting me through the process of writing a second book and for helping me become my best self in our journey together. To my three daughters, for working harder and smarter than I did at their ages and for their patience during my writing process.
– Alvin Ashcraft
Alvin Ashcraft is a writer, software engineer, and developer community champion with over 27 years of experience in software and content development. He has worked with Microsoft Windows, web, and cloud technologies since 1995 and has been awarded as a Microsoft MVP 13 times.
Alvin works remotely in the Philadelphia area for Microsoft as a content developer on Microsoft Learn for the Windows developer documentation team. He also helps organize the TechBash developer conference in the Northeast US. He has previously worked for companies such as Oracle, Genzeon, and Allscripts. Originally from the Allentown, PA, area, Alvin currently resides in West Grove, PA, with his wife and daughters.
I want to thank the people who have been close to me and supported me, especially my parents and my wife, Stelene’s, parents.
Ricardo Peres is a Portuguese developer, blogger, and book author and is currently a team leader at Dixons Carphone. He has over 20 years of experience in software development and his interests include distributed systems, architectures, design patterns, and .NET development. He won the Microsoft MVP award in 2015 and held this title up to 2020.
He also authored Entity Framework Core Cookbook – Second Edition and Mastering ASP.NET Core 2.0 and was a technical reviewer for Learning NHibernate 4 for Packt. He also contributed to Syncfusion’s Succinctly collection, with titles on .NET development. Ricardo maintains a blog—Development With A Dot—where he writes about technical issues. You can keep up with him on Twitter at @rjperes75.
Joseph Guadagno is a senior director of engineering at Rocket Mortgage, the US’s largest mortgage lender, based in Detroit, Michigan. He has been writing software for over 30 years and has been an active member of the .NET community, serving as a Microsoft MVP in .NET, for more than 10 years. He has spoken throughout the United States and at international events on topics including Microsoft .NET, Microsoft Azure, and SQL. You can see the complete list of events he has spoken at at https://www.josephguadagno.net/presentations.
When not sitting at a computer, Joe loves to hang out with his family and play games. You can connect with Joe on Twitter at @jguadagno, on Facebook at JosephGuadagnoNet, and on his blog at https://www.josephguadagno.net.
In this part, you will learn the basics of managed threading in .NET, discover how it has evolved since the early days of the .NET Framework, and pick up some best practices to avoid common pitfalls.
This part contains the following chapters:
Chapter 1, Managed Threading ConceptsChapter 2, Evolution of Multithreaded Programming in .NETChapter 3, Best Practices for Managed ThreadingChapter 4, User Interface Responsiveness with Threading