Module Await_capsule.Mutex

type 'k t = 'k Await_sync.Mutex.t
type packed =
  1. | P : 'k t -> packed
val create : Base.unit -> packed

Creates a mutex with a fresh existential key type.

Like create. Useful in module definitions, where GADTs cannot be unpacked.

val with_lock : 'k 'a 'b. Await_kernel.Await.t @ local -> ('k t -> (f: ('k Portable_kernel.Capsule.Access.t -> 'a @ portable contended) @ local once portable -> 'a @ portable contended) @ local) @ local