DispatcherQueueController DispatcherQueueController DispatcherQueueController DispatcherQueueController Class


Manages the lifetime of a DispatcherQueue. Provides methods to create and shutdown the DispatcherQueue.

public : sealed class DispatcherQueueController
struct winrt::Windows::System::DispatcherQueueController
public sealed class DispatcherQueueController
Public NotInheritable Class DispatcherQueueController

Windows 10 requirements

Device family
Windows 10 Fall Creators Update (introduced v10.0.16299.0)
API contract
Windows.Foundation.UniversalApiContract (introduced v5)


Object and Thread Lifetime

DispatcherQueueController and its associated DispatcherQueue will be kept alive while the event loop is running. When Shutdown is completed, the loop is terminated and the dedicated thread will unwind. However, DispacherQueueController and the associated DispatcherQueue object can outlive thread’s lifetime and will be disposed when all their references are released.


DispatcherQueue DispatcherQueue DispatcherQueue DispatcherQueue

Gets the DispatcherQueue associated with this DispatcherQueueController.


CreateOnDedicatedThread() CreateOnDedicatedThread() CreateOnDedicatedThread() CreateOnDedicatedThread()

Creates a DispatcherQueue that you can use to run tasks on a dedicated thread.

ShutdownQueueAsync() ShutdownQueueAsync() ShutdownQueueAsync() ShutdownQueueAsync()

Stops the DispatcherQueue associated with this DispatcherQueueController. Shuts down the thread if the DispatcherQueueController was created by CreateOnDedicatedThread.