observe

abstract fun observe(observer: () -> Unit): AutoCloseable(source)

Installs the sole retained-node observer.

Return

idempotent owner-thread subscription release.

Parameters

observer

callback invoked on the owner thread after a distinct frame-boundary snapshot commit.

Throws

when called from another thread, after close, or while another observer is live.