sig
  type key
  type ('a, 'b, 'c) t = {
    enter : '-> JoinCount.Monitor.key;
    leave : JoinCount.Monitor.key * '-> unit;
    is_pending : JoinCount.Monitor.key -> bool;
    get_pendings : unit -> (JoinCount.Monitor.key * 'a) list;
    wait : unit -> 'c;
    finished : unit Join.chan;
  }
  val create : ('-> '-> 'c) -> '-> ('a, 'b, 'c) JoinCount.Monitor.t
end