Из этого краткого руководства вы узнаете, как механизм async в С# 5.0 позволяет упростить написание асинхронного кода. Помимо ясного введения в асинхронное программирование вообще, вы найдете углубленное описание работы этого конкретного механизма и ответ на вопрос, когда и зачем использовать его в собственных приложениях. В книге рассматриваются следующие вопросы. Как писать асинхронный код вручную и как механизм async скрывает неприглядные детали. Новые способы повышения производительности серверного кода в приложениях ASP.NET . Совместная работа async и WinRT в приложениях для Windows 8. Смысл ключевого слова await в async-методах. В каком потоке .NET исполняется асинхронный код в каждой точке программы. Написание асинхронных API, согласованных с паттерном Task-based Asynchronous Pattern (ТАР). Распараллеливание программ для задействования возможностей современных компьютеров. Измерение производительности async-кода и сравнение с альтернативными подходами. Книга рассчитана на опытных программистов на С#, но будет понятна и начинающим. Она изобилует примерами кода, который можно использовать в своих программах.
If you don't have experience with async/await(like me), this is a great first book on the topic.
I've tried to start reading about async/await from "C# In Depth", but I had difficulties digesting the topic there. As a result I've bought "Async in C# 5.0" and now feel that I am ready to get back to "C# in Depth"
I think that the chapter on how the async code is transformed by the compiler could've been written better. Personally I like this explanation.
Also I didn't like the explanation about the SynchronizationContext. I think that this blog is doing better job at explaining it.
If you already have an idea of C# async feature and been working with it for a while, you'll probably find this book a bit repetitive or boring at times. It does dive on some more advanced topics like decompiling async code to understand what the compiler is doing under the hood, so it's not exclusively for beginners though.
Personally I found it useful to get a more complete picture of this language in terms of asynchronous techniques.
Quite perfect. Short, detailed and yet written in a way that is easy to grasp. Some things might be slightly outdated but it is definitely worth to read. Helps to get a mental picture on how async works.
A nice, short book covering a broad overview of how Async programming works in C#. A new version is out now, but this is still has good information for people who, like me, have used Async programming in the past but never really understood what is happening under the hood. A good book to have for reference in the future.
Asi nejlepší a určitě nejpodrobnější kniha o asynchronním kódu psaném v C# za pomoci klíčových slovech async/await.
Knihu ale potřebujete pouze tehdy, když:
1) Nečtete blog PFX teamu http://blogs.msdn.com/b/pfxteam/), kde jsou všechna témata v knize vyložena lépe a podrobněji - snad s výjimkou Actor modelu, který ale podle mě ani v knize není vysvětlen moc dobře. Prohlédl jsem si i projekt n-act (https://code.google.com/p/n-act/), jehož autor je shodný s autorem této knihy, a myslím si, že jde jen o letmé načrtnutí toho, jak by mohl Actor model dnes v C# fungovat za pomoci dynamické proxy a klíčových slov async/await.
2) Nejste nadšenci, kteří se od prvních beta verzí koukali do dekompilovaného kódu, abyste pochopili, jak kompilátor C# a s využitím jakých datových struktur generuje "continuations".
Předpokládám, že i tak je ale cílová skupina této velmi slušné knihy docela početná.:)
This book was short and sweet (108 pages). It provides the big picture and goes into some specifics with clarity on how to write, test, and debug asynchronous code in a .NET 4.5+ environment. All in all, it is worth having around for reference. I read it from cover to cover in a short amount of time and plan to go back through and savor a bit more when time permits. I would not look to it as an end-all for your every concurrency programming need, as it is extremely brief.
It explains the obscure art of async style of programming in C# 5.0, something that for a person who thinks synchronously is a huge mental shift.
But it lacks in hands on examples to understand, and at the end I felt like I crammed in too much new theory without practicing and feeling confident about it.
This entire review has been hidden because of spoilers.
It is a good read to get into the topic, but there are way too less examples. Overall the book is too thin and the chapters cover some topics very briefly. But It is a good start. If you want to go deep into this with lots of explanations and examples go and get Pro Asynchronous Programming with .NET from Richard Blewett ands Andrew Clymer.