package moonpool

  1. Overview
  2. Docs
Pools of threads supported by a pool of domains

Install

Dune Dependency

Authors

Maintainers

Sources

moonpool-0.7.tbz
sha256=c4a1f974200530ab7f6014de3a369fdbb260ff454183640f32e51ba3fec51b15
sha512=865daabb96e3d60f88ecee9fc9030dad8b257fff4121b404e882d8a8d6687b737beb6e22366f52eb14e770dfab28b326853a1d3d883fa19bbd791d8450b40f8b

doc/src/moonpool.fib/handle.ml.html

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.