mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 12:45:45 -04:00
comments
This commit is contained in:
parent
8a8299020a
commit
76efa381c3
1 changed files with 6 additions and 6 deletions
|
|
@ -1,17 +1,17 @@
|
||||||
type 'a t = {
|
type 'a t = {
|
||||||
mutable size: int;
|
mutable size: int;
|
||||||
mutable q: 'a list;
|
mutable q: 'a list;
|
||||||
(* The queue is a FIFO represented as a list in reverse order *)
|
(** The queue is a FIFO represented as a list in reverse order *)
|
||||||
batch: int; (* Minimum size to batch before popping *)
|
batch: int; (** Minimum size to batch before popping *)
|
||||||
high_watermark: int;
|
high_watermark: int; (** Size above which we start dropping signals *)
|
||||||
timeout: Mtime.span option;
|
timeout: Mtime.span option;
|
||||||
mutable start: Mtime.t;
|
mutable start: Mtime.t;
|
||||||
mutex: Mutex.t;
|
mutex: Mutex.t;
|
||||||
}
|
}
|
||||||
|
|
||||||
(* Mutex.protect was added in OCaml 5.1, but we want support back to 4.08 *)
|
(* Mutex.protect was added in OCaml 5.1, but we want support back to 4.08.
|
||||||
(* cannot inline, otherwise flambda might move code around. (as per Stdlib) *)
|
cannot inline, otherwise flambda might move code around. (as per Stdlib) *)
|
||||||
let[@inline never] protect m f =
|
let[@inline never] protect_mutex m f =
|
||||||
Mutex.lock m;
|
Mutex.lock m;
|
||||||
Fun.protect f ~finally:(fun () -> Mutex.unlock m)
|
Fun.protect f ~finally:(fun () -> Mutex.unlock m)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue