Webcast: Asynchronous Programming Demystified

preview_player
Показать описание
Featuring Stephen Cleary, Microsoft MVP

Asynchronous code using the new async and await keywords seems to be everywhere these days! These keywords are transforming the way programs are written. Yet many developers feel unsure about Async programming.

Get demystified with Stephen Cleary, as he introduces the new keywords and describes how they work. Stephen is the author of Concurrency in C# Cookbook as well as several MSDN articles on asynchronous programming. In this webcast Stephen covers:

» How the async and await keywords really work
» How to think about asynchronous code
» The difference between asynchrony and parallelism
» Common mistakes when learning asynchronous programming
» Fixing Async code smells with CodeIt.Right

Рекомендации по теме
Комментарии
Автор

Thank you Mr. Cleary. To explain the async/await mechanism and how captured context works clarifies how callbacks are installed under the hood. A class or type that is both a return type and an argument to an await operator concurs with how these types represent arbitrary asynchronous operations. Your lecture was monumental.

daveparsons
Автор

i saw a lot of videos and they all missing one point which is the awaitable method returns to its caller before it finishes its work that is the key in my opinion to understand async programming thank you sir for clarifying this point

toabaomar
Автор

Thank you Sir! This is the best async/await explanation ever. I just ordered your book.

technics
Автор

32:46 "field". Not "variable". "bytes" is a variable. _byteCount, textBox1 and label1 are fields.
When you _teach_ something, you _must_ use the strictest terminology possible.
Counterarguments: but it can change, therefore it is a variable! No, it may very well be _variable_ (adjective) but it is not _a_ variable (noun). A field is guaranteed to live somewhere in memory, have memory allocated for it. A variable may _or may not_ exist _at all_ in the resulting program.

GeorgeTsiros
Автор

34:50 "By the time you make _one_ method asynchronous? You have to, everything that calls it has to await it... and for them to await it, _they_ have to be asynchronous..."
void NOTasyncMethod() {
var result = Task.Run(() => SomeAsyncMethod()).Result;
}
😶

GeorgeTsiros
Автор

appending "Async" to method names is superfluous and reminds me of iCount, strMessage, fHeight. Also reminds me of "NullReferenceException" and "InvalidOperationException". Horrible, horrible names. Of course it is an exception. Its name is "Invalid Operation". What could that name indicate? Success? Of course not. "Null reference exception" ? No, that's just plain wrong. The error is not caused by a null reference. The error is caused by _dereferencing_ a null reference. It _should_ be called "NullDereferenced".

Since the method returns a Task or Task<> _it is an async method_
If you reply to this with "but what if it returns a Task or Task<> but is _not_ an async method?" that's not an argument, because the same can be asked for "what if it has to be named ending in "Async" but is _not_ an async method?" Names mean _nothing_ . The determining factor is use of the keyword "async".

GeorgeTsiros