Skip to content

Commit 0750e6a

Browse files
committed
prepare for 0.6
1 parent a127a41 commit 0750e6a

16 files changed

+49
-22
lines changed

CHANGES.md

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

2+
# 0.6
3+
4+
- breaking: remove `Immediate_runner` (bug prone and didn't
5+
handle effects). `Moonpool_fib.main` can be used to handle
6+
effects in the main function.
7+
- remove deprecated alias `Moonpool.Pool`
8+
9+
- feat: add structured concurrency sub-library `moonpool.fib` with
10+
fibers. Fibers can use `await` and spawn other fibers that will
11+
be appropriately cancelled when their parent is.
12+
- feat: add add `moonpool-lwt` as an experimental bridge between moonpool and lwt.
13+
This allows moonpool runners to be used from within Lwt to
14+
perform background computations, and conversely to call Lwt from
15+
moonpool with some precautions.
16+
- feat: task-local storage in the main moonpool runners, available from
17+
fibers and regular tasks.
18+
- feat: add `Exn_bt` to core
19+
- feat: add `Runner.dummy`
20+
- make `moonpool.forkjoin` optional (only on OCaml >= 5.0)
21+
- feat: add `Fut.Advanced.barrier_on_abstract_container_of_futures`
22+
- feat: add `Fut.map_list`
23+
24+
- refactor: split off domain pool to `moonpool.dpool`
25+
- fix too early exit in Ws_pool
26+
227
# 0.5.1
328

429
- fix `Ws_pool`: workers would exit before processing

dune-project

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

44
(name moonpool)
5-
(version 0.5.1)
5+
(version 0.6)
66
(generate_opam_files true)
77
(source
88
(github c-cube/moonpool))
@@ -35,7 +35,7 @@
3535

3636
(package
3737
(name moonpool-lwt)
38-
(synopsis "Event loop for moonpool based on Lwt-engine")
38+
(synopsis "Event loop for moonpool based on Lwt-engine (experimental)")
3939
(allow_empty) ; on < 5.0
4040
(depends
4141
(moonpool (= :version))

moonpool-lwt.opam

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# This file is generated by dune, edit dune-project instead
22
opam-version: "2.0"
3-
version: "0.5.1"
4-
synopsis: "Event loop for moonpool based on Lwt-engine"
3+
version: "0.6"
4+
synopsis: "Event loop for moonpool based on Lwt-engine (experimental)"
55
maintainer: ["Simon Cruanes"]
66
authors: ["Simon Cruanes"]
77
license: "MIT"

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.5.1"
3+
version: "0.6"
44
synopsis: "Pools of threads supported by a pool of domains"
55
maintainer: ["Simon Cruanes"]
66
authors: ["Simon Cruanes"]

src/core/background_thread.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
77
This is similar to {!Fifo_pool} with exactly one thread.
88
9-
@since NEXT_RELEASE
9+
@since 0.6
1010
*)
1111

1212
include module type of Runner

src/core/exn_bt.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
(** Exception with backtrace.
22
3-
@since NEXT_RELEASE *)
3+
@since 0.6 *)
44

55
type t = exn * Printexc.raw_backtrace
66
(** An exception bundled with a backtrace *)

src/core/fifo_pool.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ val create : (unit -> t, _) create_args
3636
@param on_exit_thread called at the end of each worker thread in the pool.
3737
@param around_task a pair of [before, after] functions
3838
ran around each task. See {!Pool.create_args}.
39-
@param name name for the pool, used in tracing (since NEXT_RELEASE)
39+
@param name name for the pool, used in tracing (since 0.6)
4040
*)
4141

4242
val with_ : (unit -> (t -> 'a) -> 'a, _) create_args

src/core/fut.mli

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ val fail : exn -> Printexc.raw_backtrace -> _ t
5252

5353
val fail_exn_bt : Exn_bt.t -> _ t
5454
(** Fail from a bundle of exception and backtrace
55-
@since NEXT_RELEASE *)
55+
@since 0.6 *)
5656

5757
val of_result : 'a or_error -> 'a t
5858

@@ -85,15 +85,15 @@ val is_done : _ t -> bool
8585

8686
val is_success : _ t -> bool
8787
(** Checks if the future is resolved with [Ok _] as a result.
88-
@since NEXT_RELEASE *)
88+
@since 0.6 *)
8989

9090
val is_failed : _ t -> bool
9191
(** Checks if the future is resolved with [Error _] as a result.
92-
@since NEXT_RELEASE *)
92+
@since 0.6 *)
9393

9494
val raise_if_failed : _ t -> unit
9595
(** [raise_if_failed fut] raises [e] if [fut] failed with [e].
96-
@since NEXT_RELEASE *)
96+
@since 0.6 *)
9797

9898
(** {2 Combinators} *)
9999

src/core/moonpool.mli

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@ module Immediate_runner : sig end
1818
[@@deprecated "use Moonpool_fib.Main"]
1919
(** Runner that runs tasks in the caller thread.
2020
21-
This is removed since NEXT_RELEASE, and replaced by {!Moonpool_fib.Main}. *)
21+
This is removed since 0.6, and replaced by {!Moonpool_fib.Main}. *)
2222

2323
module Exn_bt = Exn_bt
2424

2525
exception Shutdown
2626
(** Exception raised when trying to run tasks on
2727
runners that have been shut down.
28-
@since NEXT_RELEASE *)
28+
@since 0.6 *)
2929

3030
val start_thread_on_some_domain : ('a -> unit) -> 'a -> Thread.t
3131
(** Similar to {!Thread.create}, but it picks a background domain at random
@@ -48,7 +48,7 @@ val run_wait_block : ?ls:Task_local_storage.t -> Runner.t -> (unit -> 'a) -> 'a
4848
{b NOTE} be careful with deadlocks (see notes in {!Fut.wait_block}
4949
about the required discipline to avoid deadlocks).
5050
@raise Shutdown if the runner was already shut down
51-
@since NEXT_RELEASE *)
51+
@since 0.6 *)
5252

5353
val recommended_thread_count : unit -> int
5454
(** Number of threads recommended to saturate the CPU.

src/core/runner.mli

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ val run_wait_block : ?ls:Task_local_storage.t -> t -> (unit -> 'a) -> 'a
5454
val dummy : t
5555
(** Runner that fails when scheduling tasks on it.
5656
Calling {!run_async} on it will raise Failure.
57-
@since NEXT_RELEASE *)
57+
@since 0.6 *)
5858

5959
(** {2 Implementing runners} *)
6060

0 commit comments

Comments
 (0)