-
Notifications
You must be signed in to change notification settings - Fork 0
Core Semantics
These are the behavioural guarantees of RamblaState as of V1. They are
frozen — the generator and every adapter build on them, so changing one is a
breaking change. Each is backed by tests. Canonical source:
SEMANTICS.md.
A PropertyChanged subscriber that throws propagates the exception (Rambla does
not swallow consumer errors). Regardless, the engine is left schedulable (the
scheduled flag is cleared and the dirty set emptied before notifications are
raised), so a later mutation flushes normally. Remaining notifications in the
aborting flush are not raised.
Within a single coalesced flush, the order of PropertyChanged events is not
guaranteed. All dirty properties are notified exactly once per flush; only their
order is unspecified. Don't depend on Bid notifying before Ask.
SetField compares with EqualityComparer<T>.Default. An equal value is a no-op:
no write, no dirty mark, no notification, and no mutation counted.
StateMetrics.Mutations counts actual state changes, not write attempts.
Leaving the outermost BeginUpdate() scope schedules exactly one flush —
unless nothing really changed, in which case none. Nested batches: only the
outermost enables scheduling. Scopes may be disposed in any order; a double
dispose is a no-op.
Batches provide notification coherence (no mid-batch notify). They do not provide cross-thread state atomicity — a background reader can still see a new
Bidbeside a staleAskbefore the batch closes. Use immutable snapshots when you need snapshot consistency.
IStateScheduler.Post may run the flush inline (like ImmediateStateScheduler)
or later (like a dispatcher). The engine is correct under both and posts the flush
outside its lock, so an inline scheduler never raises notifications while the
lock is held.
RamblaState owns no resources and is intentionally not IDisposable. It does
not own or dispose its scheduler; scheduler lifetime is the caller's. There is no
"closed" state in V1.
Rambla — state for real-time .NET desktop applications · MIT · github.com/nicoseijas/Rambla · This wiki follows ASD-STE100.
Use Rambla
Reference