package moonpool

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

Install

Dune Dependency

Authors

Maintainers

Sources

moonpool-0.8.tbz
sha256=2c10792726b1c2e4987f0f2acca5c5c221ea5cc0a2b4c75ad4fd2709e32aab6f
sha512=801c399ae9b72dd5f84624cdee9bcbb56c5ed9c371001e00176e685686234b4135d69e48877412b25a5127ad59b729000d5422dad0c90e2ded2744b974dddeca

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.