mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-08 04:05:41 -05:00
expose Atomic
This commit is contained in:
parent
7ee064fc11
commit
e8ba4feea1
4 changed files with 9 additions and 2 deletions
2
src/dune
2
src/dune
|
|
@ -1,7 +1,7 @@
|
||||||
(library
|
(library
|
||||||
(public_name moonpool)
|
(public_name moonpool)
|
||||||
(name moonpool)
|
(name moonpool)
|
||||||
(private_modules atomic_ domain_ d_pool_)
|
(private_modules d_pool_)
|
||||||
(libraries threads either))
|
(libraries threads either))
|
||||||
|
|
||||||
(rule
|
(rule
|
||||||
|
|
|
||||||
|
|
@ -5,3 +5,4 @@ let start_thread_on_some_domain f x =
|
||||||
module Pool = Pool
|
module Pool = Pool
|
||||||
module Fut = Fut
|
module Fut = Fut
|
||||||
module Blocking_queue = Bb_queue
|
module Blocking_queue = Bb_queue
|
||||||
|
module Atomic = Atomic_
|
||||||
|
|
|
||||||
|
|
@ -62,3 +62,9 @@ module Blocking_queue : sig
|
||||||
queue, until it's entirely drained; then [pop] will
|
queue, until it's entirely drained; then [pop] will
|
||||||
also raise {!Closed}. *)
|
also raise {!Closed}. *)
|
||||||
end
|
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. *)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
open Moonpool
|
open! Moonpool
|
||||||
|
|
||||||
let pool = Pool.create ~min:4 ()
|
let pool = Pool.create ~min:4 ()
|
||||||
let pool2 = Pool.create ~min:2 ()
|
let pool2 = Pool.create ~min:2 ()
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue