commit

abstract suspend fun commit()

Flushes all staged operations atomically to the underlying storage.

This is a suspending call; it must be invoked from a coroutine. The coroutine will be suspended until the write completes or fails.

Throws

if commit has already been called on this editor.

if the underlying storage layer reports a write failure.

CancellationException

if the calling coroutine is cancelled before the write completes. Structured concurrency is respected — the exception propagates normally.