Version 1.3.0
This is a preliminary version of the documentation. Help us to improve it by filling tickets. We are looking for native english speakers to proof read the documentation. Contact us!
module Lwt_mutex:sig..end
locked mutex returns whether mutex is currently lockedtype t val create : unit -> tval lock : t -> unit Lwt.tval unlock : t -> unitval is_locked : t -> boollocked mutex returns whether mutex is currently lockedval is_empty : t -> boolis_empty mutex returns true if they are no thread waiting on the mutex, and false otherwiseval with_lock : t -> (unit -> 'a Lwt.t) -> 'a Lwt.twith_lock lock f is used to lock a mutex within a block scope. The function f () is called with the mutex locked, and its result is returned from the call to . If an exception is raised from f, the mutex is also unlocked before the scope of is exited.