I’m happy to announce the release of Domainslib 0.5.0.
Domainslib is a parallel programming library for the upcoming OCaml 5. Domainslib provides support for parallel operations such as parallel_for
, async
/await
tasks etc. with an efficient work-stealing mechanism in its core. Tasks are expressed with effect handlers, enabling efficient nested parallelism.
You can give it a spin with the 5.0.0~alpha1 compiler. For examples of Domainslib programs, here is a tutorial on parallel programming with domainslib, KC’s hands on tutorial at the Tarides retreat, and another one Marek and I did at ICFP 2022.
Submissions of interesting Domainslib benchmarks appreciated at sandmark. Results of existing ones can be viewed at https://sandmark.tarides.com/ under the parallel benchamrks tab. Please feel free to add your multicore/effects libraries and experiments to awesome-multicore-ocaml.
Changes from the previous release:
- Bug fix for
parallel_for_reduce
on empty loops. - Make Chan.t and Task.promise injective Make Chan.t and Task.promise injective ocaml-multicore/domainslib#69
- Add lockfree dependency remove Ws_deque module ocaml-multicore/domainslib#70
- CI fixes (Add alpha repo to GitHub Actions ocaml-multicore/domainslib#73, Run
5.0.0~alpha0
in the CI ocaml-multicore/domainslib#76) - Breaking change: Rename
num_additional_domains
tonum_domains
for setup_pool - Documentation updates (Use
invalid_arg
ocaml-multicore/domainslib#80, Document that non-commutative operators are okay ocaml-multicore/domainslib#81, Explain what will happen with an empty pool ocaml-multicore/domainslib#82)