A sample project showing the concepts of what happens when a coroutine is used to switch a function to a background thread and then back to the UI thread when using a DispatcherQueue.
The DispatcherQueue is modeled as a message only window. There is enough evidence in the call stack to indicate that this is how a DispatcherQueue is implemented.
The default thread pool is used. C++/WinRT uses the WinRT thread pool, but this should just be a wrapper over the Windows thread pool functionality.
The concrete functions used for the thread pool and dispatcher are in the awaiter. The threadpool work function is a captureless lambda which calls resume on the coroutine handle. The dispatcher function is a lambda that again calls resume on the coroutine handle.