module Lock:sig..end
type t
val make_reentrant : bool -> tval lock : t -> unitval lock_interruptibly : t -> unitlock, except that some other thread may interrupt the
current thread while blocked.
Raises Runtime.Interrupted if the thread is interrupted.
val new_condition : t -> Condition.tval try_lock : t -> booltrue. Otherwise,
immediately returns false.val try_lock_time : t -> int64 -> TimeUnit.t -> booltry_lock_time l t u is similar to lock_interruptibly l, except
that the current thread will at most wait for t (time value whose
unit is u). Returns whether the lock was acquired.
Raises Runtime.Interrupted if the thread is interrupted.
val unlock : t -> unit
Raises Invalid_argument if the current thread does not hold the
lock.