---
title: commit()
framework: browserenginekit
role: symbol
role_heading: Instance Method
path: browserenginekit/layerhierarchyhostingtransactioncoordinator/commit()
---

# commit()

Notifies the render server to coordinate transactions for the added views and layer hierarchies.

## Declaration

```swift
@MainActor func commit()
```

## Mentioned in

Hosting browser view layers in the rendering extension

## Discussion

Discussion In all processes that share a transaction coordinator instance, call this method as the last interaction with the instance. Before calling this method: Add the relevant views and layer hierarchies to the transaction coordinator. Share the coordinator between processes. Perform the necessary transactions. Use the instance only once; after you call this method, discard the instance. note: This method synchronizes changes committed in CATransaction objects that affect the added views and layer hierarchies; it doesn’t commit the transactions. Call commit() on each relevant transaction.

## See Also

### Synchronizing transactions

- [add(_:)](browserenginekit/layerhierarchyhostingtransactioncoordinator/add(_:)-7day0.md)
- [add(_:)](browserenginekit/layerhierarchyhostingtransactioncoordinator/add(_:)-i66q.md)
