mirror of
https://github.com/ocaml-tracing/ocaml-opentelemetry.git
synced 2026-03-08 03:47:59 -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 get = Atomic.get
|
||||
|
||||
let add self x =
|
||||
while
|
||||
let old = Atomic.get self in
|
||||
|
|
@ -2,6 +2,9 @@
|
|||
|
||||
type 'a t
|
||||
|
||||
val get : 'a t -> 'a list
|
||||
(** Snapshot *)
|
||||
|
||||
val make : unit -> 'a t
|
||||
|
||||
val add : 'a t -> 'a -> unit
|
||||
|
|
@ -6,6 +6,10 @@ module Lock = Lock
|
|||
module Rand_bytes = Rand_bytes
|
||||
(** Generation of random identifiers. *)
|
||||
|
||||
module AList = AList
|
||||
(** Atomic list, for internal usage
|
||||
@since NEXT_RELEASE *)
|
||||
|
||||
open struct
|
||||
let[@inline] result_bind x f =
|
||||
match x with
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue