Liquidsoap_lang_prelude.Mutex_utilsLocks over shared state.
val mk_state : unit -> stateval mutable_lock : state:state -> ('a -> 'b) -> 'a -> 'bval atomic_lock : state:state -> ('a -> 'b) -> 'a -> 'bA lock the thread already holding it may take again, as a no-op. fast picks atomic_lock, where waiters spin, over mutable_lock, where they sleep.
val mk_reentrant : unit -> reentrantval reentrant_lock : fast:bool -> state:reentrant -> ('a -> 'b) -> 'a -> 'b