sonder-joker
05/23/2021, 7:05 AMjim
05/23/2021, 12:32 PMChuck Jazdzewski [G]
05/24/2021, 4:03 PMmutableStateOf()
) snapshot isolation (https://en.wikipedia.org/wiki/Snapshot_isolation).
We intentionally avoided transaction terminology to avoid name collision with database libraries like Room, for example, and snapshot do no provide durability (the D in ACID). Snapshot are atomic, (snapshot) consistent, and isolated but not durable.
Whenever a object is written to it is recorded in the snapshot and when that snapshot applies all apply observers are notified that the object might have been changed.
Composition installs an apply observer and, combined with a read observer, automatically subscribes to changes to state objects. Layout and draw similarly install apply observers so and are also notified when objects read during layout or draw are changed and they will invalidate the layout or render nodes that are affected.