Share via


DispatcherQueueController.CreateOnDedicatedThread Method

Definition

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

public:
 static DispatcherQueueController ^ CreateOnDedicatedThread();
 static DispatcherQueueController CreateOnDedicatedThread();
public static DispatcherQueueController CreateOnDedicatedThread();
function createOnDedicatedThread()
Public Shared Function CreateOnDedicatedThread () As DispatcherQueueController

Returns

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

Remarks

This method creates a thread, and associates a DispatcherQueue with that thread. A DispatcherQueue is created, and associated with the current thread. You can access the created DispatcherQueue via DispatcherQueueController.DispatcherQueue.

The created DispatcherQueue continues running on its dedicated thread until explicitly shut down. To avoid thread and memory leaks, when you're finished with the DispatcherQueue call DispatcherQueueController.ShutdownQueue or DispatcherQueueController.ShutdownQueueAsync.

Applies to