package apero-core

  1. Overview
  2. Docs
type 'a t = {
  1. mutable self : 'a;
  2. mutex : Lwt_mutex.t;
}
val create : 'a -> 'a t
val get : 'a t -> 'a
val acquire : 'a t -> 'a Lwt.t
val release : 'a t -> 'a -> unit
val set : 'a -> 'a t -> unit Lwt.t
val guarded : 'a t -> ('a -> ('a * 'b Lwt.t) Lwt.t) -> 'b Lwt.t
val return : 'a -> 'b -> ('b * 'a Lwt.t) Lwt.t
val return_lwt : 'a -> 'b -> ('b * 'a) Lwt.t
OCaml

Innovation. Community. Security.