diff --git a/src/client-ocurl/AList.ml b/src/core/AList.ml similarity index 94% rename from src/client-ocurl/AList.ml rename to src/core/AList.ml index 9b7d47df..faec8000 100644 --- a/src/client-ocurl/AList.ml +++ b/src/core/AList.ml @@ -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 diff --git a/src/client-ocurl/AList.mli b/src/core/AList.mli similarity index 72% rename from src/client-ocurl/AList.mli rename to src/core/AList.mli index b4c718dd..4799dd6b 100644 --- a/src/client-ocurl/AList.mli +++ b/src/core/AList.mli @@ -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 diff --git a/src/core/opentelemetry.ml b/src/core/opentelemetry.ml index cc5186e2..964d0183 100644 --- a/src/core/opentelemetry.ml +++ b/src/core/opentelemetry.ml @@ -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