package balancer
-
balancer
Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
Thread safe mutable that provides the gaurentees of a Multi Reader single Writer RW mutex, it handles locking and unlocking on it's own so you don't have to touch the mutex
val read : 'a t -> 'a Lwt.t
Aquires a read lock and returns data
val value : 'a t -> 'a
Reads the inner value without a read lock for use in update and sync effect
val create : 'a -> 'a t
val become : 'a t -> 'a -> unit Lwt.t
Acquires write lock and sets value
val update : 'a t -> ('a -> 'a) -> 'a Lwt.t
Acquires write lock and applies f to it's contents
val sync : 'a t -> (unit -> 'b Lwt.t) -> 'b Lwt.t