Partager via


XTaskQueue library overview

Use this topic to manage task queues with the XTaskQueue library. This library is responsible for the "when" and "where" of running tasks, which is controlled by task queues and the methods that set up, manage, and control task queues.

Task queues can have two ports set to different modes and dispatched on any thread. Custom callbacks can be added to call in special circumstances for functionality.

Each process has a default task queue that automatically dispatches its tasks concurrently in the system thread pool. This task pool is used if no task queue is specified in the XAsyncBlock. You can change or remove the default task queue.

For more information about XTaskQueue APIs, see XTaskQueue.

XTaskQueueHandle

When a task queue is created, it's tracked by an XTaskQueueHandle type. This handle identifies the task queue and is passed to any function in the XTaskQueue library that works with task queues. The handle must be tracked and closed when it's no longer using the task queue.

For more information about cleaning up task queues, see Cleanup task queue.

See also

Example: Create Task Queue
Example: Dispatch Task Queue
Example: Cleanup Task Queue
XAsync
Designing the task queue
XTaskQueue