package shared-memory-ring

  1. Overview
  2. Docs

Module Front.WriterSource

A stream of writable items

include Ring.STREAM
Sourcetype stream = Cstruct.t
Sourcetype position = int32

A stream remains at a fixed position so that repeated calls to read or write process the same data. To advance the stream call advance new_position

Sourceval advance : stream -> position -> unit

advanced stream position declares that we have processed all data up to position and therefore any buffers may be recycled.

write stream item returns writable buffers at the current position. This function does not advance the stream, so multiple calls will write at the same position. To advance the stream, call advance position

OCaml

Innovation. Community. Security.