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));
Yielding control await Task.Delay(5000); await Task.Yield(); Background running var result = await Task.Run(() => { … work … }); Parallel composition Task first = await Task.WhenAny(task1, task2); var results = await Task.WhenAll(task1, task2);