Presentation is loading. Please wait.

Presentation is loading. Please wait.

please wait for the next slide clicking won’t make it come any faster.

Similar presentations


Presentation on theme: "please wait for the next slide clicking won’t make it come any faster."— Presentation transcript:

1

2 please wait for the next slide clicking won’t make it come any faster

3 .NET Async Windows Runtime Async

4 var data = DownloadData(...); ProcessData(data); var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data));

5 var data = DownloadData(...); ProcessData(data); var future = DownloadDataAsync(...); future.ContinueWith(data => ProcessData(data));

6 C# and Visual Basic let you do asynchronous programming without callbacks

7

8

9

10

11 Task-returning vs. void-returning

12

13

14 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);

15

16

17

18

19


Download ppt "please wait for the next slide clicking won’t make it come any faster."

Similar presentations


Ads by Google