Skip to main content

XTaskQueueCloseHandle

Closes the task queue.

Syntax

Parameters

queue   _In_
Type: XTaskQueueHandle
The queue to close.

Return value

Type: void

Remarks

XTaskQueueCloseHandle simply decrements an internal reference count on the task queue object. If there are callbacks still in the queue, those callbacks hold a reference on the queue object and they may still be called. This can pose a problem for app shutdown. When an app shuts down it will need to ensure no spurious callbacks execute after cleanup. XTaskQueue provides the XTaskQueueTerminate API to perform a controlled termination of a queue.

Requirements

Header: XTaskQueue.h Library: xgameruntime.lib Supported platforms: Windows, XBOX One family consoles and XBOX Series consoles

See also

XTaskQueue members
Asynchronous Programming Model
Async Task Queue Design
Last modified on August 20, 2026