Module Algostream_time_series.Column

Append-only Float64 column with frozen-snapshot publication.

A Column.t is a mutable, growing buffer owned by exactly one Domain. To make column data visible across Domains race-free, the producer calls freeze which allocates a fresh Bigarray.Array1.t sized to the current length. That fresh Bigarray is the *only* thing handed across Domain boundaries (typically inside an immutable Snapshot.t published via Atomic.set). The producer never mutates a frozen Bigarray afterwards.

Cross-Domain rule: callers MUST treat any Bigarray.Array1.t received from freeze as immutable. Writing to it is undefined behaviour because another Domain may be concurrently reading.

type t
val create : ?capacity:int -> unit -> t
val push : t -> float -> unit
val length : t -> int
val capacity : t -> int
val freeze : t -> (float, Stdlib.Bigarray.float64_elt, Stdlib.Bigarray.c_layout) Stdlib.Bigarray.Array1.t

Freeze the current contents into a fresh Float64 Bigarray of length length t. The returned array is a copy — the producer is free to continue pushing into t without affecting any frozen view that's already been handed out.

module Int64_col : sig ... end

Same idea for an int64 column (for timestamps).