---
title: "waitForEvent(_:value:)"
framework: metal
role: symbol
role_heading: Instance Method
path: "metal/mtl4commandqueue/waitforevent(_:value:)"
---

# waitForEvent(_:value:)

Schedules an operation to wait for a GPU event of a specific value before continuing to execute any future GPU work.

## Declaration

```swift
func waitForEvent(_ event: any MTLEvent, value: UInt64)
```

## Parameters

- `event`: doc://com.apple.metal/documentation/Metal/MTLEvent to wait on.
- `value`: The specific value to wait for.
