---
title: initWithQueue
framework: driverkit
role: symbol
role_heading: Instance Method
path: driverkit/iocommandpool/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

Return Value Returns true if command pool was successfully initialized.

## Discussion

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