<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLIOCommandBuffer/enqueue()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLIOCommandBuffer(im)enqueue"
  },
  "title" : "enqueue()"
}
-->

# enqueue()

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

```
func enqueue()
```

## Discussion

The method saves the next position for the command buffer in the input/output command queue. You can call [`enqueue()`](/documentation/Metal/MTLIOCommandBuffer/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()`](/documentation/Metal/MTLIOCommandBuffer/commit()) method.

For example, to fill multiple command buffers asynchronously that execute in a specific order:

1. Call each command buffer’s [`enqueue()`](/documentation/Metal/MTLIOCommandBuffer/enqueue()) method in order.
2. Encode commands into each command buffer on its own, separate thread.
3. Call each command buffer’s [`commit()`](/documentation/Metal/MTLIOCommandBuffer/commit()) in any order.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)