sig
  type t = int * OUnitShared.scope
  val create : '-> int * 'a
  val lock : shared -> int * scope -> unit
  val try_lock : shared -> int * scope -> bool
  val unlock : shared -> int * scope -> unit
  val with_lock : shared -> int * OUnitShared.scope -> (unit -> 'a) -> 'a
end