module Mutex0: sig
.. end
create
like Mutex.create
, but creates an error-checking mutex.
Locking a mutex twice from the same thread, unlocking an unlocked mutex,
or unlocking a mutex not held by the thread will result in a Sys_error
exception.
include Mutex
create
like Mutex.create
, but creates an error-checking mutex.
Locking a mutex twice from the same thread, unlocking an unlocked mutex,
or unlocking a mutex not held by the thread will result in a Sys_error
exception.
val create : unit -> Mutex.t
val create : unit -> Mutex.t
val phys_equal : 'a -> 'a -> bool
val equal : t -> t -> bool
val critical_section : t -> f:(unit -> 'a) -> 'a
val synchronize : ('a -> 'b) -> 'a -> 'b
val update_signal : t -> Condition.t -> f:(unit -> 'a) -> 'a
val update_broadcast : t -> Condition.t -> f:(unit -> 'a) -> 'a
val try_lock : t -> [> `Acquired | `Already_held_by_me_or_other ]
create
like Mutex.create
, but creates an error-checking mutex.
Locking a mutex twice from the same thread, unlocking an unlocked mutex,
or unlocking a mutex not held by the thread will result in a Sys_error
exception.