Module Tiny_httpd_unix.Sem

semaphore, for limiting concurrency.

type t = {
  1. mutable n : int;
  2. max : int;
  3. mutex : Stdlib.Mutex.t;
  4. cond : Stdlib.Condition.t;
}
val create : int -> t
val acquire : int -> t -> unit
val release : int -> t -> unit
val num_acquired : t -> int