mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-08 03:47:57 -04:00
add .mli for rpool
This commit is contained in:
parent
81096e0d3c
commit
a4779227fa
1 changed files with 10 additions and 0 deletions
10
src/util/rpool.mli
Normal file
10
src/util/rpool.mli
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
(** A resource pool (for buffers) *)
|
||||||
|
|
||||||
|
type 'a t
|
||||||
|
|
||||||
|
val create :
|
||||||
|
max_size:int -> create:(unit -> 'a) -> clear:('a -> unit) -> unit -> 'a t
|
||||||
|
|
||||||
|
val alloc : 'a t -> 'a
|
||||||
|
val recycle : 'a t -> 'a -> unit
|
||||||
|
val with_ : 'a t -> ('a -> 'b) -> 'b
|
||||||
Loading…
Add table
Reference in a new issue