package fuseau

  1. Overview
  2. Docs

Module Fuseau.Buf_poolSource

A pool of buffers to reuse.

Sourcetype t

Buffer pool.

This type is thread-safe.

Sourceval create : ?buf_size:int -> ?max_size:int -> unit -> t

Create a pool

Sourceval acquire : t -> bytes

Take a buffer from the pool. Once done with it, the buffer should be recycle'd.

Sourceval recycle : t -> bytes -> unit

Give a buffer back to the pool.

Sourceval with_buf : t -> (bytes -> 'a) -> 'a
OCaml

Innovation. Community. Security.