From acae4ff88d0748f7b1f39d9a25ce2bca712e2b85 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Sat, 1 Nov 2025 22:18:16 -0400 Subject: [PATCH] doc --- src/fuchsia/buf_chain.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/fuchsia/buf_chain.ml b/src/fuchsia/buf_chain.ml index 493944c..73d4479 100644 --- a/src/fuchsia/buf_chain.ml +++ b/src/fuchsia/buf_chain.ml @@ -23,6 +23,12 @@ open struct let shard_mask = shard - 1 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 bufs = if sharded then (