please wait for the next slide clicking won’t make it come any faster
.NET Async Windows Runtime Async
var data = DownloadData(...); ProcessData(data); var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data));
var data = DownloadData(...); ProcessData(data); var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data));
C# and Visual Basic let you do asynchronous programming without callbacks
Task-returning vs. void-returning
Yielding control await Task.Delay(5000); await Task.Yield(); Background running var result = await Task.Run(() => { … work … }); Parallel composition var winningTask = await Task.WhenAny(task1, task2); var results = await Task.WhenAll(task1, task2);