# `GSLayer withUpdatesDisabled(_:)`

*Instance Method*

Performs work while deferring updates and change notifications.

## Declaration

```swift
func withUpdatesDisabled<E, T>(_ body: () throws(E) -> T) throws(E) -> T where E : Error
```

## Parameters

- `body` — The work to perform.

## Return Value

The value returned by the body.

## Discussion

Updates are processed when the body returns or throws. Updates remain disabled when they were already disabled on entry.

## See Also

### Update Control

- [`GSLayer.disableUpdates`](/Core/GlyphsCore/GSLayer/disableUpdates) — Whether updates and change notifications are deferred.
- [`GSLayer ignoreUpdates`](/Core/GlyphsCore/GSLayer/ignoreUpdates) — Suppresses update tracking for current and subsequent changes.
- [`GSLayer isIgnoringUpdates`](/Core/GlyphsCore/GSLayer/isIgnoringUpdates) — Whether update tracking is suppressed.
- [`GSLayer stopUpdates`](/Core/GlyphsCore/GSLayer/stopUpdates) — Defers updates and change notifications.
- [`GSLayer startUpdates`](/Core/GlyphsCore/GSLayer/startUpdates) — Processes deferred updates and sends combined change notifications.
- [`GSLayer enableFutureUpdates`](/Core/GlyphsCore/GSLayer/enableFutureUpdates) — Resumes updates without reporting changes made while updates were disabled or ignored.

