prepare for 0.8

This commit is contained in:
Simon Cruanes 2025-04-17 16:35:19 -04:00
parent 2b00a0cea1
commit ed0eda226c
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
9 changed files with 24 additions and 11 deletions

View file

@ -1,4 +1,17 @@
# 0.8
- api(fut): make alias `'a Fut.t = 'a Picos.Computation.t` public
- feat: add `Fut.make_promise`, have `'a promise = private 'a fut`
- feat(exn_bt): in show/pp, do print the backtrace when present
- feat: block signals in workers if asked to
- relax bound on picos to 0.5-0.6
- feat fib: `spawn_ignore` now has `?on` optional param
- change Moonpool.Chan so it's bounded (stil experimental)
- fix task local storage: type was too specific
- fix fiber: use a single fut/computation in fibers
# 0.7 # 0.7
- add `Moonpool_fiber.spawn_top_ignore` - add `Moonpool_fiber.spawn_top_ignore`

View file

@ -2,7 +2,7 @@
(using mdx 0.2) (using mdx 0.2)
(name moonpool) (name moonpool)
(version 0.7) (version 0.8)
(generate_opam_files true) (generate_opam_files true)
(source (source
(github c-cube/moonpool)) (github c-cube/moonpool))

View file

@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead # This file is generated by dune, edit dune-project instead
opam-version: "2.0" opam-version: "2.0"
version: "0.7" version: "0.8"
synopsis: "Async IO for moonpool, relying on picos (experimental)" synopsis: "Async IO for moonpool, relying on picos (experimental)"
maintainer: ["Simon Cruanes"] maintainer: ["Simon Cruanes"]
authors: ["Simon Cruanes"] authors: ["Simon Cruanes"]

View file

@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead # This file is generated by dune, edit dune-project instead
opam-version: "2.0" opam-version: "2.0"
version: "0.7" version: "0.8"
synopsis: "Event loop for moonpool based on Lwt-engine (experimental)" synopsis: "Event loop for moonpool based on Lwt-engine (experimental)"
maintainer: ["Simon Cruanes"] maintainer: ["Simon Cruanes"]
authors: ["Simon Cruanes"] authors: ["Simon Cruanes"]

View file

@ -1,6 +1,6 @@
# This file is generated by dune, edit dune-project instead # This file is generated by dune, edit dune-project instead
opam-version: "2.0" opam-version: "2.0"
version: "0.7" version: "0.8"
synopsis: "Pools of threads supported by a pool of domains" synopsis: "Pools of threads supported by a pool of domains"
maintainer: ["Simon Cruanes"] maintainer: ["Simon Cruanes"]
authors: ["Simon Cruanes"] authors: ["Simon Cruanes"]

View file

@ -3,7 +3,7 @@
The channels have bounded size. Push/pop return futures or can use effects The channels have bounded size. Push/pop return futures or can use effects
to provide an [await]-friendly version. to provide an [await]-friendly version.
The channels became bounded since @NEXT_RELEASE . The channels became bounded since @0.7 .
*) *)
type 'a t type 'a t
@ -35,13 +35,13 @@ val push : 'a t -> 'a -> unit
(** Push the value into the channel, suspending the current task (** Push the value into the channel, suspending the current task
if the channel is currently full. if the channel is currently full.
@raise Closed if the channel is closed @raise Closed if the channel is closed
@since NEXT_RELEASE *) @since 0.7 *)
val pop : 'a t -> 'a val pop : 'a t -> 'a
(** Pop an element. This might suspend the current task if the (** Pop an element. This might suspend the current task if the
channel is currently empty. channel is currently empty.
@raise Closed if the channel is empty and closed. @raise Closed if the channel is empty and closed.
@since NEXT_RELEASE *) @since 0.7 *)
(* (*
val pop_block_exn : 'a t -> 'a val pop_block_exn : 'a t -> 'a

View file

@ -25,7 +25,7 @@ type 'a t = 'a Picos.Computation.t
type 'a promise = private 'a t type 'a promise = private 'a t
(** A promise, which can be fulfilled exactly once to set (** A promise, which can be fulfilled exactly once to set
the corresponding future. the corresponding future.
This is a private alias of ['a t] since NEXT_RELEASE, previously it was opaque. *) This is a private alias of ['a t] since 0.7, previously it was opaque. *)
val make : unit -> 'a t * 'a promise val make : unit -> 'a t * 'a promise
(** Make a new future with the associated promise. *) (** Make a new future with the associated promise. *)
@ -38,7 +38,7 @@ val make_promise : unit -> 'a promise
{[let prom = Fut.make_promise();; {[let prom = Fut.make_promise();;
let fut = (prom : _ Fut.promise :> _ Fut.t) ;; let fut = (prom : _ Fut.promise :> _ Fut.t) ;;
]} ]}
@since NEXT_RELEASE *) @since 0.7 *)
val on_result : 'a t -> ('a or_error -> unit) -> unit val on_result : 'a t -> ('a or_error -> unit) -> unit
(** [on_result fut f] registers [f] to be called in the future (** [on_result fut f] registers [f] to be called in the future

View file

@ -147,7 +147,7 @@ val spawn_ignore : ?on:Runner.t -> ?protect:bool -> (unit -> _) -> unit
(** [spawn_ignore f] is [ignore (spawn f)]. (** [spawn_ignore f] is [ignore (spawn f)].
The fiber will still affect termination of the parent, ie. the The fiber will still affect termination of the parent, ie. the
parent will exit only after this new fiber exits. parent will exit only after this new fiber exits.
@param on the optional runner to use, added since NEXT_RELEASE *) @param on the optional runner to use, added since 0.7 *)
val spawn_top_ignore : on:Runner.t -> (unit -> _) -> unit val spawn_top_ignore : on:Runner.t -> (unit -> _) -> unit
(** Like {!spawn_top} but ignores the result. (** Like {!spawn_top} but ignores the result.

View file

@ -26,4 +26,4 @@ val main : (Moonpool.Runner.t -> 'a) -> 'a
val main' : ?block_signals:bool -> unit -> (Moonpool.Runner.t -> 'a) -> 'a val main' : ?block_signals:bool -> unit -> (Moonpool.Runner.t -> 'a) -> 'a
(** Same as {!main} but with room for optional arguments. (** Same as {!main} but with room for optional arguments.
@since NEXT_RELEASE *) @since 0.7 *)