Cancellation and Progress

Because the Async pattern relies on the Task class, implementing cancellation is something similar to what you have already studied back in Chapter 41, thus the CancellationTokenSource and CancellationToken classes are used. In this section you see how to implement cancellation both for asynchronous methods and for Task.Run operations. Next, you learn how to report the progress of an operation, which is common in asynchronous programming and improves the user experience.

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.