The Old-Fashioned Way: Event-Based Asynchrony
More often than not, applications need to perform multiple tasks at one time, while still remaining responsive to user interaction. One of the possibilities offered by the .NET Framework since the early days is the Event-based Asynchronous Pattern (EAP). A class that adheres to this pattern implements a number of methods whose names terminate with the Async
suffix and that execute some work on a different thread. Such methods mirror their synchronous counterparts, which instead block the caller thread. Also, for each of these asynchronous methods, there is an event whose name terminates with the Completed
suffix and that is raised when the asynchronous operation completes. This way, the caller gets ...
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.