package moonpool

  1. Overview
  2. Docs

Source file handle.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
module A = Atomic

type t = int

let counter_ = A.make 0
let equal : t -> t -> bool = ( = )
let compare : t -> t -> int = Stdlib.compare
let[@inline] generate_fresh () = A.fetch_and_add counter_ 1

(* TODO: better hash *)
let[@inline] hash x = x land max_int

module Set = Set.Make (Int)
module Map = Map.Make (Int)
OCaml

Innovation. Community. Security.