diff --git a/src/dune b/src/dune index 2dcceea2..ef116a05 100644 --- a/src/dune +++ b/src/dune @@ -1,7 +1,7 @@ (library (public_name moonpool) (name moonpool) - (private_modules atomic_ domain_ d_pool_) + (private_modules d_pool_) (libraries threads either)) (rule diff --git a/src/moonpool.ml b/src/moonpool.ml index c44db86b..8bd5d50e 100644 --- a/src/moonpool.ml +++ b/src/moonpool.ml @@ -5,3 +5,4 @@ let start_thread_on_some_domain f x = module Pool = Pool module Fut = Fut module Blocking_queue = Bb_queue +module Atomic = Atomic_ diff --git a/src/moonpool.mli b/src/moonpool.mli index 783dd00c..ca809bf7 100644 --- a/src/moonpool.mli +++ b/src/moonpool.mli @@ -62,3 +62,9 @@ module Blocking_queue : sig queue, until it's entirely drained; then [pop] will also raise {!Closed}. *) end + +module Atomic = Atomic_ +(** Atomic values. + + This is either a shim using [ref], on pre-OCaml 5, or the + standard [Atomic] module on OCaml 5. *) diff --git a/test/t_futs1.ml b/test/t_futs1.ml index 5ee8d113..7f782836 100644 --- a/test/t_futs1.ml +++ b/test/t_futs1.ml @@ -1,4 +1,4 @@ -open Moonpool +open! Moonpool let pool = Pool.create ~min:4 () let pool2 = Pool.create ~min:2 ()