

Full description not available
C**N
With Moore's Law fading away, this book deserves your attention - STRONGLY RECOMMENDED!
Though relatively short (319pp), Richard Blewitt and Andrew Clymer have managed to cover pretty much every facet of current Async development for the .NET platform. I initially picked up the book to get their take on TPL Dataflow but ended up reading the entire book in a couple of days and gained several new insights.Chapters 1-3 introduce async concepts and trace the evolution of asynchronous development (truly async, not necessarily "parallel") up to and including the familiar Task and Task<T>. Even if you've done async programming in .NET before, these chapters do a nice job bringing the concepts together and is worth your time.Chapter 4 ("Basic Thread Safety") patiently guides the reader through both the concepts/necessity of atomic operations as well as an overview of .NET's synchronization primitives. It's worth reading through two or three times to really cement your understanding of what's actually behind lock { }, for instance.Chapter 5 provides a somewhat thin but reasonably complete discussion of concurrent data structures. There are nice nuggets of wisdom if read carefully. For instance, the ConcurrentDictionary class requires a single-threaded lock on all objects when the hash table behind the scenes encounters a lot of collisions. The remedy: estimate the working size and pass that into the constructor. Good stuff.Chapter 6 discusses async UI and the gotchas associated with improper attempts to update the UI thread from an outside thread. While Visual Studio does a good job of guiding developers through these errors, an understanding of the concepts in this chapter make it that much easier to write UI-aware code from the get-go.Chapters 7-8 naturally lead to the "new" (not really that new anymore) async and await keywords in C#/VB along with useful Task operations. The discussion of how async/await functions are rewritten as state machines is very useful and might make you curious enough to write a simple async function and view the resulting code in Reflector. My only slight criticism of this chapter is that the known holes in the Task-oriented async/await implementation aren't discussed in any real detail. I would suggest searching for "Tomas Petricek c# async gotchas" in addition to avoid unnecessary debugging headaches.Chapter 9 discusses server-side async. If you're developing solutions for ASP.NET Web Forms/MVC/Web API or WCF you're sure to find some useful info. Surprisingly, the authors omitted discussing the incredibly useful [...] class and its ProcessRequestAsync overridable function. If you're a little closer to the metal on ASP.NET then I'd suggest adding this to your list of topics to learn about.Chapter 10 highlights the extremely awesome (that's the technical phrase) TPL Dataflow library. Andrew Clymer knocks it out of the park with an easily understandable overview, including use cases and diagrams. After reading this chapter you'll immediately think of real-world applications that will save you a ton of effort. I would also suggest searching for "Stephen Toub inside TPL DataFlow Channel 9 MSDN". Though it is from 2011, the core concepts remain the same with optimizations and enhancements in the latest library available on NuGet.Chapter 11 (Parallel Programming) might be considered a bit of a bolt-on, especially after considering the in-depth async material of the earlier chapters. The discussion of Parallel.For and Parallel.ForEach are good introductions to these classes and the authors do a nice job distinguishing between async and parallel. The section on PLINQ - though well-written - is pretty much wasted space as you would be wise to avoid PLINQ in production scenarios. The authors go out of their way to be tactful about this so I'll just say it for them.Chapter 12 is an advanced chapter that discusses the Task Scheduler. If you're needing to replace .NET's default Task Schedulers then most of this book might be considered fairly basic to you. Nevertheless, the scenarios mentioned and the sample code are valuable as there isn't a wealth of information on the topic out there.Chapters 13-14 concludes the book with a solid discussion of async debugging in Visual Studio and other tools. If anything, you will come away impressed (perhaps even awed) by the work done by the VS team to simplify what is an otherwise incredibly difficult debugging experience. In the not-too-distant-past, debugging multithreaded/async code using was more the domain of systems programmers and the clinically insane. The authors do a good job highlighting the tools available and you will definitely be excited to get your hands on everything VS has to offer. It would have been useful to get a better understanding of how to debug/monitor CPU cache hits (e.g., when are internal values obtained by the L1/L2/L3 caches) as the authors mentioned it in two sidebars in previous chapters but didn't really follow that up with how to actually prove you're writing code that is cache-friendly. I suppose that's a fairly advanced scenario, though.Overall, I wouldn't hesitate recommending this book. It doesn't waste any space so you might find yourself re-reading certain sections to wring out every bit of info you can. With multicore development becoming a necessity, if you're working on a .NET project then you won't be disappointed with this book. Great job, Richard and Andrew! I only hope they'll follow up with a book on Distributed Programming with .NET (the next obvious transition moving forward).
V**K
You must async read this book
A must read for any C# developer on asynchronous programming, with contious, detailed, easy to follow explanations and examples with async implementations in wide and different domains
J**Y
Good but not sufficient
There is good information in this book, and much of it is presented well. But it isn't sufficient to live up to its cover statement of “Become an async programming expert.” To accomplish that the authors would need to do a great job filtering, organizing, communicating and teaching the information. It was the teaching aspect that was the weakest: Although there were many code examples, they weren't really presented as learning exercises. And while portions of the book did a great job communicating, other portions were in need of some more hours of editing work. Still, I learned from it and will use it as a reference. I’d recommend it if you are looking for a reference and not looking for tutorials, recipes and learning exercises. In looking for up-to-date books on the subject (comprehensive books current with .NET 4.5), this is the best I've found, so I’m rating it 4 out of 5 stars.
E**C
The Missing Piece
I was frikin' hitting my head against the wall trying to understand the underlying mechanisms behind modern C# asynchronous and multi-threading constructs. I was reading Programming C# 8.0, and the chapters on concurrency where just horrible, couldn't get my head around them. I had come from a background in GNU/Linux and UNIX multi-threading programming in C, so my basics on thread synchronization, CPU scheduling, etc., were all up to speed. I bought a book from O'Reilly called Concurrency in C# Cookbook which promised to demystify all of this but, alas, it was just recipe after recipe of unexplained interfaces and classes.This book will guide you gently through everything concurrent in C#, taking you down the history lane so that you can understand why things are the way they are in the future. Yes, this book is from 2013, and there are several newer varieties of syntactic sugar and other niceties in C#. But, in general, the book does a brilliant job at casting a light why everything works the way it does.Give it a spin. You won't regret it.
P**.
Complex Topic explained clearly by someone who has a deep understanding
If you have been looking for a clear explanation of the various complex issues involved with concurrency and asynchrony, this book is what you have been waiting for. Richard Blewett has a gift for explaining complex issues clearly by breaking them down to simpler parts. You can read this book from cover to cover if you like, or you can pick and choose just what you need and keep it as a ready reference.Pro Asynchronous Programming with .NET catches us all up to the relatively recent developments in .Net 4 and .Net 4.5 in a way that is accessible. If you have been struggling with trying to get on the learning curve with this topic, I recommend this book as the place to begin.
M**T
Well explained primitives and threading methodology, but would benefit from more design guidelines.
This book does well in describing the synchronization primitives and threading methods that exist in .NET, both in the newest versions of .NET, but also when using older versions of the .NET framework. There are a lot of examples in how each threading implementation works, using each method and focus on how each revision of the .NET framework has improved on the usage of threading and synchronization logic.I did however hope to find more information about how to handle common threading issues, such as ensuring a thread safe data model, handling events and reentrancy in a multi threaded system and isolating data by thread, without losing connectivity with data possibly locked by other threads.
Trustpilot
3 weeks ago
2 months ago