DispatcherQueueController Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Manages the lifetime of a DispatcherQueue. Provides methods to create and shutdown the DispatcherQueue.
public ref class DispatcherQueueController sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 327680)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class DispatcherQueueController final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 327680)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class DispatcherQueueController
Public NotInheritable Class DispatcherQueueController
- Inheritance
- Attributes
Windows requirements
Device family |
Windows 10 Fall Creators Update (introduced in 10.0.16299.0)
|
API contract |
Windows.Foundation.UniversalApiContract (introduced in v5.0)
|
Remarks
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.
Properties
DispatcherQueue |
Gets the DispatcherQueue associated with this DispatcherQueueController. |
Methods
CreateOnDedicatedThread() |
Creates a DispatcherQueue that you can use to run tasks on a dedicated thread. |
ShutdownQueueAsync() |
Asynchronously stops the DispatcherQueue associated with this DispatcherQueueController, and shuts down the thread if the DispatcherQueueController was created by CreateOnDedicatedThread. This method returns (an asynchronous operation) as soon as the shutdown operation is started; but the asynchronous operation doesn't complete until the shutdown operation is complete. |