class type mutex =object..end
method lock : unit -> unitIn 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 -> unitIn a multi-threaded program: Unlocks a mutex. In a single-threaded program: This is a no-op
method try_lock : unit -> boolIn 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 : exnMay be used internally be the implementation