Skip to content

Commit 8e9628a

Browse files
committed
prepare for 0.3
1 parent 366d265 commit 8e9628a

File tree

8 files changed

+36
-13
lines changed

8 files changed

+36
-13
lines changed

CHANGES.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,27 @@
11

2+
# 0.3
3+
4+
- add `Fork_join` for parallelizing computations. This is only
5+
available on OCaml 5.x because it relies on effects.
6+
- add `Fork_join.{for_,map_array,map_list}`
7+
- add `Fork_join.all_{list,init}`
8+
- add `Pool.with_`
9+
- add a channel module
10+
- add `Runner`, change `Pool` to produce a `Runner.t`
11+
- add a `Lock` module
12+
- add support for domain-local-await when installed
13+
- add `Fut.await` for OCaml >= 5.0
14+
15+
- fix: Fork_join.both_ignore now has a more general type
16+
17+
- expose `Suspend_` and its internal effect with an unstability alert.
18+
This is intended for implementors of `Runner` only.
19+
- port `cpp.ml` from containers, replace previous codegen with it.
20+
This will provide better flexibility for supporting multiple versions
21+
of OCaml in the future.
22+
- add `Pool.run_wait_block`; rename `Pool.run` into `Pool.run_async`
23+
- fix: in blocking queue, `pop` works on a non empty closed queue
24+
225
# 0.2
326

427
- add `Fut.for_list`

dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
(using mdx 0.2)
33

44
(name moonpool)
5-
(version 0.2)
5+
(version 0.3)
66
(generate_opam_files true)
77
(source
88
(github c-cube/moonpool))

moonpool.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.2"
3+
version: "0.3"
44
synopsis: "Pools of threads supported by a pool of domains"
55
maintainer: ["Simon Cruanes"]
66
authors: ["Simon Cruanes"]

src/chan.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,6 @@ val close : _ t -> unit
4747
val pop_await : 'a t -> 'a
4848
(** Like {!pop} but suspends the current thread until an element is
4949
available. See {!Fut.await} for more details.
50-
@since NEXT_RELEASE *)
50+
@since 0.3 *)
5151

5252
[@@@endif]

src/fork_join.mli

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ val for_ : ?chunk_size:int -> int -> (int -> int -> unit) -> unit
6161
Use [~chunk_size:1] if you explicitly want to
6262
run each iteration of the loop in its own task.
6363
64-
@since NEXT_RELEASE
64+
@since 0.3
6565
{b NOTE} this is only available on OCaml 5. *)
6666

6767
val all_array : ?chunk_size:int -> (unit -> 'a) array -> 'a array
@@ -71,7 +71,7 @@ val all_array : ?chunk_size:int -> (unit -> 'a) array -> 'a array
7171
@param chunk_size if equal to [n], groups items by [n] to be run in
7272
a single task. Default is [1].
7373
74-
@since NEXT_RELEASE
74+
@since 0.3
7575
{b NOTE} this is only available on OCaml 5. *)
7676

7777
val all_list : ?chunk_size:int -> (unit -> 'a) list -> 'a list
@@ -80,7 +80,7 @@ val all_list : ?chunk_size:int -> (unit -> 'a) list -> 'a list
8080
8181
@param chunk_size if equal to [n], groups items by [n] to be run in
8282
a single task. Default is not specified.
83-
This parameter is available since NEXT_RELEASE.
83+
This parameter is available since 0.3.
8484
8585
@since 0.3
8686
{b NOTE} this is only available on OCaml 5. *)
@@ -91,19 +91,19 @@ val all_init : ?chunk_size:int -> int -> (int -> 'a) -> 'a list
9191
9292
@param chunk_size if equal to [n], groups items by [n] to be run in
9393
a single task. Default is not specified.
94-
This parameter is available since NEXT_RELEASE.
94+
This parameter is available since 0.3.
9595
9696
@since 0.3
9797
{b NOTE} this is only available on OCaml 5. *)
9898

9999
val map_array : ?chunk_size:int -> ('a -> 'b) -> 'a array -> 'b array
100100
(** [map_array f arr] is like [Array.map f arr], but runs in parallel.
101-
@since NEXT_RELEASE
101+
@since 0.3
102102
{b NOTE} this is only available on OCaml 5. *)
103103

104104
val map_list : ?chunk_size:int -> ('a -> 'b) -> 'a list -> 'b list
105105
(** [map_list f l] is like [List.map f l], but runs in parallel.
106-
@since NEXT_RELEASE
106+
@since 0.3
107107
{b NOTE} this is only available on OCaml 5. *)
108108

109109
[@@@endif]

src/lock.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(** Mutex-protected resource.
22
3-
@since NEXT_RELEASE *)
3+
@since 0.3 *)
44

55
type 'a t
66
(** A value protected by a mutex *)

src/pool.mli

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
A pool of threads. The pool contains a fixed number of threads that
44
wait for work items to come, process these, and loop.
55
6-
This implements {!Runner.t} since NEXT_RELEASE.
6+
This implements {!Runner.t} since 0.3.
77
88
If a pool is no longer needed, {!shutdown} can be used to signal all threads
99
in it to stop (after they finish their work), and wait for them to stop.
@@ -66,7 +66,7 @@ val with_ : (unit -> (t -> 'a) -> 'a) create_args
6666
are released.
6767
6868
Most parameters are the same as in {!create}.
69-
@since NEXT_RELEASE *)
69+
@since 0.3 *)
7070

7171
val run : t -> (unit -> unit) -> unit
7272
[@@deprecated "use run_async"]

src/runner.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(** Abstract runner.
22
33
This provides an abstraction for running tasks in the background.
4-
@since NEXT_RELEASE
4+
@since 0.3
55
*)
66

77
type task = unit -> unit

0 commit comments

Comments
 (0)