Immutable snapshot publication with epoch/revision identity (#5) #21

Merged
faumaray merged 1 commits from issue/5-immutable-publication into main 2026-12-03 08:08:17 +00:00
Owner

Closes #5.

Branch issue/5-immutable-publication targeting main. Summary, tests and the documented contracts are in the commit message and the issue comment.

Closes #5. Branch `issue/5-immutable-publication` targeting `main`. Summary, tests and the documented contracts are in the commit message and the issue comment.
faumaray added 1 commit 2026-12-03 06:49:20 +00:00
- Publication<T>: single-writer, multi-reader publication of complete
  immutable values. acquire() returns a retainable Snapshot; a retained
  snapshot stays coherent across any number of later publishes and keeps
  the value alive until the last reader releases it.
- publish() is compare-and-publish over one atomic (value + version)
  state: an expected epoch must match, and the new version must advance
  (higher epoch, or same epoch with higher revision). Rejected publishes
  leave the last good publication untouched, so a failed preparation
  cannot corrupt readers.
- publish_next()/publish_epoch() convenience helpers.
- 7 tests: retained snapshots, stale-epoch rejection, non-advancing
  revision, epoch reset, last-reader resource release, failed
  preparation preservation and concurrent reader coherence.
faumaray merged commit 2474292462 into main 2026-12-03 08:08:17 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Void/Library#21