class type mutex = object
.. end
method lock : unit -> unit
In a multi-threaded program: Suspends the calling thread until the
mutex is locked.
In a single-threaded program: This is a no-op
method unlock : unit -> unit
In a multi-threaded program: Unlocks a mutex.
In a single-threaded program: This is a no-op
method try_lock : unit -> bool
In a multi-threaded program: Tries to immediately lock the mutex,
and returns whether the lock could be obtained.
In a single-threaded program: returns true
method repr : exn
May be used internally be the implementation