expose Atomic

This commit is contained in:
Simon Cruanes 2023-06-10 00:20:24 -04:00
parent 7ee064fc11
commit e8ba4feea1
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
4 changed files with 9 additions and 2 deletions

View file

@ -1,7 +1,7 @@
(library
(public_name moonpool)
(name moonpool)
(private_modules atomic_ domain_ d_pool_)
(private_modules d_pool_)
(libraries threads either))
(rule

View file

@ -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_

View file

@ -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. *)

View file

@ -1,4 +1,4 @@
open Moonpool
open! Moonpool
let pool = Pool.create ~min:4 ()
let pool2 = Pool.create ~min:2 ()