---
title: enqueueBarrier()
framework: metal
role: symbol
role_heading: Instance Method
path: metal/mtliocommandqueue/enqueuebarrier()
---

# enqueueBarrier()

Appends a barrier that tells the input/output command queue to finish running all in-flight command buffers before running any new command buffers.

## Declaration

```swift
func enqueueBarrier()
```
