XTaskQueueUnregisterMonitor

Unregisters a previously registered monitor callback.

Syntax

void XTaskQueueUnregisterMonitor(  
         XTaskQueueHandle queue,  
         XTaskQueueRegistrationToken token  
)  

Parameters

queue   _In_
Type: XTaskQueueHandle

The queue to remove the submit callback from.

token   _In_
Type: XTaskQueueRegistrationToken

The registration token returned from XTaskQueueRegisterMonitor.

Return value

Type: void

Remarks

Note

This function isn't safe to call on a time-sensitive thread. For more information, see Time-sensitive threads.

If XTaskQueueRegisterMonitor was previously invoked to register an XTaskQueueMonitorCallback callback for a task queue, use XTaskQueueUnregisterMonitor to unregister the callback. Once unregistered, the callback is no longer invoked when tasks are submitted to the task queue for execution. Unregistering the callback also releases its reference to the task queue handle.

Note

If you call XTaskQueueRegisterMonitor to register an XTaskQueueMonitorCallback callback with a task queue, you must use XTaskQueueUnregisterMonitor to unregister the callback before closing the task queue handle with XTaskQueueCloseHandle; otherwise, a memory leak can occur. A task queue handle is a shareable resource, and isn't actually destroyed until all references to that handle are released. For more information, see Async task queue design.

Requirements

Header: XTaskQueue.h

Supported platforms: Windows, Xbox One family consoles and Xbox Series consoles

See also

XTaskQueueRegisterMonitor
XTaskQueueMonitorCallback
XTaskQueue members
Asynchronous Programming Model
Async Task Queue design