Skip to content

refactor: add SeriesBufferInner type#144

Open
KevinWMatthews wants to merge 3 commits intonominal-io:mainfrom
KevinWMatthews:kevin/series-buffer-inner-type
Open

refactor: add SeriesBufferInner type#144
KevinWMatthews wants to merge 3 commits intonominal-io:mainfrom
KevinWMatthews:kevin/series-buffer-inner-type

Conversation

@KevinWMatthews
Copy link
Contributor

@KevinWMatthews KevinWMatthews commented Dec 15, 2025

This PR moves two fields of SeriesBuffer into a new type, SeriesBufferInner, the moves this type to a module inner. This inner type provides/controls access to:

  • the points buffer (write, mutex-guarded)
  • the count (read-only, atomic)

The inner module restricts direct access to these struct members, requiring access through SeriesBufferInner's API.

The intent is for:

  • updates to the points buffer can be slow and must be coherent
  • reads / checks to the points are fast (do not require locking)

For the motivation behind this PR, see #139.

Move two fields of SeriesBuffer into a new type, SeriesBufferInner.
This inner type provides/controls access to:
- the points buffer (write, mutex-guarded)
- the count (read-only, atomic)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant