mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-10 12:45:45 -04:00
move AList to core
This commit is contained in:
parent
3d16de634f
commit
2ac799f10d
3 changed files with 9 additions and 0 deletions
|
|
@ -4,6 +4,8 @@ type 'a t = 'a list Atomic.t
|
||||||
|
|
||||||
let make () = Atomic.make []
|
let make () = Atomic.make []
|
||||||
|
|
||||||
|
let get = Atomic.get
|
||||||
|
|
||||||
let add self x =
|
let add self x =
|
||||||
while
|
while
|
||||||
let old = Atomic.get self in
|
let old = Atomic.get self in
|
||||||
|
|
@ -2,6 +2,9 @@
|
||||||
|
|
||||||
type 'a t
|
type 'a t
|
||||||
|
|
||||||
|
val get : 'a t -> 'a list
|
||||||
|
(** Snapshot *)
|
||||||
|
|
||||||
val make : unit -> 'a t
|
val make : unit -> 'a t
|
||||||
|
|
||||||
val add : 'a t -> 'a -> unit
|
val add : 'a t -> 'a -> unit
|
||||||
|
|
@ -6,6 +6,10 @@ module Lock = Lock
|
||||||
module Rand_bytes = Rand_bytes
|
module Rand_bytes = Rand_bytes
|
||||||
(** Generation of random identifiers. *)
|
(** Generation of random identifiers. *)
|
||||||
|
|
||||||
|
module AList = AList
|
||||||
|
(** Atomic list, for internal usage
|
||||||
|
@since NEXT_RELEASE *)
|
||||||
|
|
||||||
open struct
|
open struct
|
||||||
let[@inline] result_bind x f =
|
let[@inline] result_bind x f =
|
||||||
match x with
|
match x with
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue