---
title: maxCommandsInFlight
framework: metal
role: symbol
role_heading: Instance Property
path: metal/mtliocommandqueuedescriptor/maxcommandsinflight
---

# maxCommandsInFlight

Sets the largest number of individual commands that an input/output command queue can run at a time.

## Declaration

```swift
var maxCommandsInFlight: Int { get set }
```

## Discussion

Discussion Set to 0 to instruct Metal to select an appropriate value for you — based on the system’s available memory.

## See Also

### Configuring the input/output command queue

- [priority](metal/mtliocommandqueuedescriptor/priority.md)
- [type](metal/mtliocommandqueuedescriptor/type.md)
- [maxCommandBufferCount](metal/mtliocommandqueuedescriptor/maxcommandbuffercount.md)
