---
title: initWithQueue
framework: DriverKit
role: symbol
role_heading: Instance Method
platforms: [DriverKit, iOS, iPadOS, macOS]
path: driverkit/iocommandpool/3758243-initwithqueue
---

# initWithQueue

## Declaration

```occ
virtual bool initWithQueue(IODispatchQueue *queue);
```

## Parameters

- `queue`: The IODispatchQueue that this command pool should synchronize with. This queue must have been allocated with the kIODispatchQueueReentrant option.

## Return Value

Returns true if command pool was successfully initialized.

## Discussion

Primary initializer for an IOCommandPool object.

Primary initializer for an IOCommandPool. Should probably use IOCommandPool::withQueue() as it is easier to use.
