![]() By convention, the names of asynchronous APIs end with "Async" to indicate that part of their execution is likely to take place after control has returned to the caller. Many UWP features, such as the MediaCapture APIs and StorageFile APIs, are exposed as asynchronous APIs. JavaScript, C#, Visual Basic, and C++ each provide language support for asynchronous methods. A much better way is to use asynchronous programming, where the app continues to run and respond to the UI while it waits for an operation to complete.įor methods that might take a long time to complete, asynchronous programming is the norm and not the exception in the UWP. ![]() The app won't respond to user interaction, and because it seems non-responsive, the user might become frustrated. If you used a synchronous method on the UI thread to retrieve the content, the app is blocked until the method returns. For example, an app that downloads content from the Internet might spend several seconds waiting for the content to arrive. Using asynchronous programming helps your app stay responsive when it does work that might take an extended amount of time. This topic describes asynchronous programming in the Universal Windows Platform (UWP) and its representation in C#, Microsoft Visual Basic .NET, C++, and JavaScript.
0 Comments
Leave a Reply. |