mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-06 03:05:30 -05:00
fork-join: add both_ignore
This commit is contained in:
parent
43487ebe49
commit
03212e7478
2 changed files with 7 additions and 0 deletions
|
|
@ -87,6 +87,8 @@ let both f g : _ * _ =
|
|||
};
|
||||
get_exn st
|
||||
|
||||
let both_ignore f g = ignore (both f g : unit * unit)
|
||||
|
||||
let all_list fs : _ list =
|
||||
let len = List.length fs in
|
||||
let arr = Array.make len None in
|
||||
|
|
|
|||
|
|
@ -14,6 +14,11 @@ val both : (unit -> 'a) -> (unit -> 'b) -> 'a * 'b
|
|||
@since 0.3
|
||||
{b NOTE} this is only available on OCaml 5. *)
|
||||
|
||||
val both_ignore : (unit -> unit) -> (unit -> unit) -> unit
|
||||
(** Same as [both f g |> ignore].
|
||||
@since 0.3
|
||||
{b NOTE} this is only available on OCaml 5. *)
|
||||
|
||||
val all_list : (unit -> 'a) list -> 'a list
|
||||
(** [all_list fs] runs all functions in [fs] in tasks, and waits for
|
||||
all the results.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue