move AList to core

This commit is contained in:
Simon Cruanes 2023-12-20 15:45:39 -05:00
parent 3d16de634f
commit 2ac799f10d
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
3 changed files with 9 additions and 0 deletions

View file

@ -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

View file

@ -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

View file

@ -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