This commit is contained in:
Simon Cruanes 2025-11-01 22:18:16 -04:00
parent c2a1ee5904
commit acae4ff88d
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -23,6 +23,12 @@ open struct
let shard_mask = shard - 1 let shard_mask = shard - 1
end end
(** Create a buffer chain.
@param sharded
if true, multiple buffers are created, to reduce contention on each buffer
in case of concurrent access. This makes the buf chain thread-safe. If
false, there is only one (unprotected) buffer. *)
let create ~(sharded : bool) ~(buf_pool : Buf_pool.t) () : t = let create ~(sharded : bool) ~(buf_pool : Buf_pool.t) () : t =
let bufs = let bufs =
if sharded then ( if sharded then (