Function

asContextElement

Return a SnapshotContextElement that will enterSnapshot.enter this Snapshot whenever the associated coroutine is resumed and leave this snapshot when it suspends.

asContextElement

Source set: Common
public fun Snapshot.asContextElement(): SnapshotContextElement

Return a SnapshotContextElement that will enter this Snapshot whenever the associated coroutine is resumed and leave this snapshot when it suspends. The snapshot still must be disposed separately when it will no longer be used.

Last updated: