<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/IODispatchQueue",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@IODispatchQueue"
  },
  "title" : "IODispatchQueue"
}
-->

# IODispatchQueue

An object that manages the serial execution of blocks.

```
class IODispatchQueue;
```

## Overview

An [`IODispatchQueue`](/documentation/DriverKit/IODispatchQueue) object is a FIFO queue that you use to execute tasks serially in your driver. You submit tasks as code blocks, and the system dequeues one block at a time, executing them sequentially.

> Important:
> Always use an ``doc://com.apple.driverkit/documentation/DriverKit/IODispatchQueue`` instead of a <doc://com.apple.documentation/documentation/Dispatch/dispatch_queue_t> structure to schedule tasks for your driver.

## Topics

### Creating a Dispatch Queue

[`Create`](/documentation/DriverKit/IODispatchQueue/Create)

Creates a new dispatch queue object.

[`init`](/documentation/DriverKit/IODispatchQueue/init)

Initializes the dispatch queue object.

[`free`](/documentation/DriverKit/IODispatchQueue/free)

Performs any final cleanup for the dispatch queue object.

### Executing a Task Asynchronously

[`DispatchAsync`](/documentation/DriverKit/IODispatchQueue/DispatchAsync)

Schedule a block for asynchronous execution on the current queue.

[`DispatchAsync_f`](/documentation/DriverKit/IODispatchQueue/DispatchAsync_f)

Schedule a C-style function for asynchrous execution on the current queue.

[`IODispatchBlock`](/documentation/DriverKit/IODispatchBlock)

A block to execute on a dispatch queue.

[`IODispatchFunction`](/documentation/DriverKit/IODispatchFunction)

A C-style function to execute on a dispatch queue.

### Executing a Task Synchronously

[`DispatchSync`](/documentation/DriverKit/IODispatchQueue/DispatchSync)

Schedule a block for synchronous execution on the current queue.

[`DispatchSync_f`](/documentation/DriverKit/IODispatchQueue/DispatchSync_f)

Schedule a C-style function for synchronous execution on the current queue.

### Stopping the Queue

[`Cancel`](/documentation/DriverKit/IODispatchQueue/Cancel)

Stops the queue from dequeueing any further tasks, and notifies the specified handler when all in-flight tasks finish.

[`IODispatchQueueCancelHandler`](/documentation/DriverKit/IODispatchQueueCancelHandler)

A block to execute when a canceled dispatch queue stops executing tasks.

### Getting Queue Information

[`GetName`](/documentation/DriverKit/IODispatchQueue/GetName)

Returns the name of the queue as a C string.

[`OnQueue`](/documentation/DriverKit/IODispatchQueue/OnQueue)

Returns a Boolean value that indicates whether the current thread matches the dispatch queue’s thread.

[`IODispatchQueueName`](/documentation/DriverKit/IODispatchQueueName)

A buffer for specifying the name of a dispatch queue.

### Logging Dispatch Information

[`Log`](/documentation/DriverKit/IODispatchQueue/Log)

Log the current execution context with respect to any queues the current thread holds.

[`IODispatchLogFunction`](/documentation/DriverKit/IODispatchLogFunction)

A function that logs content.

### Instance Methods

[`DispatchConcurrent`](/documentation/DriverKit/IODispatchQueue/DispatchConcurrent)

[`DispatchConcurrent_f`](/documentation/DriverKit/IODispatchQueue/DispatchConcurrent_f)

[`RunAction`](/documentation/DriverKit/IODispatchQueue/RunAction)

[`Sleep`](/documentation/DriverKit/IODispatchQueue/Sleep)

[`SleepWithDeadline`](/documentation/DriverKit/IODispatchQueue/SleepWithDeadline)

[`SleepWithTimeout`](/documentation/DriverKit/IODispatchQueue/SleepWithTimeout)

[`Wakeup`](/documentation/DriverKit/IODispatchQueue/Wakeup)

[`WakeupWithOptions`](/documentation/DriverKit/IODispatchQueue/WakeupWithOptions)

## Relationships

### Inherits From

[`OSObject`](/documentation/DriverKit/OSObject)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)