---
title: "queue(at:)"
framework: virtualization
role: symbol
role_heading: Instance Method
path: "virtualization/vzcustomvirtiodevice/queue(at:)"
---

# queue(at:)

Returns Virtio queue at the specified index that belongs to this device.

## Declaration

```swift
func queue(at index: UInt16) -> VZVirtioQueue?
```

## Parameters

- `index`: The index of the doc://com.apple.virtualization/documentation/Virtualization/VZVirtioQueue.

## Return Value

Return Value The VZVirtioQueue object at the specified index, or nil if the index is invalid or the guest driver has disabled the queue.

## Discussion

Discussion The framework sets up the virtqueues (Virtio queues) when the guest driver sets DRIVER_OK; this call returns a valid result only after the framework calls customVirtioDeviceDidAcceptDriverOk(_:).
