Patterns and best practices
It is possible to draw parallels with and even convert from the classic threading and eventing patterns while implementing asynchronous tasks. However, async methods have to be implemented with caution to avoid deadlocks and uncaught exceptions.
Async pattern conversions
The Observer pattern—also known as the Event-based Asynchronous Pattern (EAP)—used to be the main development tool for long running processes and service/remote application APIs. Events and delegates still make up a considerable amount of UI-related implementation in modern applications.
However, asynchronous tasks and awaitables provide a much more convenient way to deal with long running processes and chain completion methods.
Fortunately, it is possible ...
Get Xamarin: Cross-Platform Mobile Application Development 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.