July 2015
Intermediate to advanced
1300 pages
87h 27m
English
Visual Basic 2012 introduced a new pattern that solves some problems related to threading and enables you to write better and cleaner code. It does this with two keywords: Async and Await. Async is a modifier you use to mark methods that run asynchronous operations. Await is an operator that gets a placeholder for the result of an asynchronous operation and waits for the result, which will be sent back at a later time while other operations are executed. This enables you to keep the caller thread responsive. For a first understanding of how this pattern works, let’s take a look at the following function that downloads the content of a website as a string, returning the result as an XDocument that can be manipulated ...