---
title: enqueue()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtliocommandbuffer/enqueue()
---

# enqueue()

Reserves a place for the input/output command buffer in the input/output command queue without committing the command buffer.

## Declaration

```swift
func enqueue()
```

## Discussion

Discussion The method saves the next position for the command buffer in the input/output command queue. You can call enqueue() at any time relative to encoding commands, but you can only enqueue a command buffer once. To submit a command buffer to GPU for execution, call its commit() method. For example, to fill multiple command buffers asynchronously that execute in a specific order: Call each command buffer’s enqueue() method in order. Encode commands into each command buffer on its own, separate thread. Call each command buffer’s commit() in any order.

## See Also

### Submitting a command buffer

- [commit()](metal/mtliocommandbuffer/commit().md)
