Source file await_sync_intf.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
(** [Poisoned] is the exception raised when trying to access a synchronization or
    communication primitive that has been poisoned. *)
exception Poisoned

(** [Frozen] is the exception raised when trying to access a synchronization or
    communication primitive that has been frozen. *)
exception Frozen

(** [Empty] is the exception raised when the target communication structure was empty. *)
exception Empty

(** [Already_full] is the exception raised when the target communication structure was
    already full. *)
exception Already_full

let () =
  Printexc.Safe.register_printer (function
    | Poisoned -> Some "Poisoned"
    | Frozen -> Some "Frozen"
    | Empty -> Some "Empty"
    | Already_full -> Some "Already_full"
    | _ -> None)
;;