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

# waitUntilCompleted()

Blocks the current thread until the GPU finishes executing the input/output command buffer and all of its completion handlers.

## Declaration

```swift
func waitUntilCompleted()
```
