Implementing Task-Based Asynchrony
As you remember from Chapter 41, the Task
class provides methods and other members that enable you to execute CPU-intensive work, by splitting code across all the available processors so that most of the code is executed concurrently, when possible. Such members of the Task
class return instances of the Task
class itself, and therefore can be used along with Await
. This possibility has some advantages:
You can execute synchronous code on a separate thread more easily.
You can run multiple tasks concurrently and ...
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.