Threading and async programming enables your app to accomplish work asynchronously in parallel threads.
Your app can use the thread pool to accomplish work asynchronously in parallel threads. The thread pool manages a set of threads and uses a queue to assign work items to threads as they become available. The thread pool is similar to the asynchronous programming patterns available in the Windows Runtime because it can be used to accomplish extended work without blocking the UI, but the thread pool offers more control than the asynchronous programming patterns and you can use it to complete multiple work items in parallel. You can use the thread pool to:
Submit work items, control their priority, and cancel work items.
Schedule work items using timers and periodic timers.
Set aside resources for critical work items.
Run work items in response to named events and semaphores.
The thread pool is more efficient at managing threads because it reduces the overhead of creating and destroying threads. The means it has access to optimize threads across multiple CPU cores, and it can balance thread resources between apps and when background tasks are running. Using the built-in thread pool is convenient because you focus on writing code that accomplishes a task instead of the mechanics of thread management.
This topic describes asynchronous programming in the Universal Windows Platform (UWP) and its representation in C#, Microsoft Visual Basic .NET, Visual C++ component extensions (C++/CX), and JavaScript.
This article describes the recommended way to consume asynchronous methods in C++/CX by using the task class that's defined in the concurrency namespace in ppltasks.h.
The Universal Windows Platform (UWP) includes many asynchronous APIs to ensure that your app remains responsive when it does work that might take an extended amount of time. This topic discusses how to use asynchronous methods from the UWP in C# or Microsoft Visual Basic.
This topic describes asynchronous programming in the Universal Windows Platform (UWP) and its representation in C#, Microsoft Visual Basic .NET, C++, and JavaScript.
Learn how to create a timer that submits a work item when the timer elapses in a Universal Windows Platform (UWP) app by using the ThreadPoolTimer API.
Learn how to create a work item that repeats periodically using the CreatePeriodicTimer method of the Universal Windows Platform (UWP) ThreadPoolTimer API.