---
title: waitUntilRunning()
framework: compositorservices
role: symbol
role_heading: Instance Method
path: compositorservices/layerrenderer/waituntilrunning()
---

# waitUntilRunning()

Stops further execution of your code until the layer renderer leaves the paused state.

## Declaration

```swift
func waitUntilRunning()
```

## Discussion

Discussion Call this function to let the system handle events while you wait for the layer to become ready. The function services incoming layer-related events until the layer exits the paused state.

## See Also

### Managing the rendering loop

- [state](compositorservices/layerrenderer/state-swift.property.md)
- [LayerRenderer.State](compositorservices/layerrenderer/state-swift.enum.md)
- [LayerRenderer.Clock](compositorservices/layerrenderer/clock.md)
