package moonpool

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

Install

dune-project
 Dependency

Authors

Maintainers

Sources

moonpool-0.6.tbz
sha256=3efd095c82a37bba8c7ab6a2532aee3c445ebe1ecaed84ef3ffb560bc65e7633
sha512=e4bcab82e6638299c2d0beb1dbf204f7b43379a5387418c6edff85b9bf90c13ad1bdd8eb44b69cd421268d1bc45bcf918bcf77e1c924348211ac27d6643aac78

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.