fix readme

This commit is contained in:
Simon Cruanes 2024-02-02 20:39:19 -05:00
parent e14fef2834
commit 6d6acba541
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4
2 changed files with 6 additions and 4 deletions

View file

@ -19,7 +19,8 @@ In addition, some concurrency and parallelism primitives are provided:
On OCaml 5 (meaning there's actual domains and effects, not just threads),
a `Fut.await` primitive is provided. It's simpler and more powerful
than the monadic combinators.
- `Moonpool.Fork_join` provides the fork-join parallelism primitives
- `Moonpool_forkjoin`, in the library `moonpool.forkjoin`
provides the fork-join parallelism primitives
to use within tasks running in the pool.
## Usage
@ -166,7 +167,8 @@ val expected_sum : int = 5050
### Fork-join
On OCaml 5, again using effect handlers, the module `Fork_join`
On OCaml 5, again using effect handlers, the sublibrary `moonpool.forkjoin`
provides a module `Moonpool_forkjoin`
implements the [fork-join model](https://en.wikipedia.org/wiki/Fork%E2%80%93join_model).
It must run on a pool (using `Runner.run_async` or inside a future via `Fut.spawn`).
@ -220,7 +222,7 @@ And a parallel quicksort for larger slices:
done;
(* sort lower half and upper half in parallel *)
Moonpool.Fork_join.both_ignore
Moonpool_forkjoin.both_ignore
(fun () -> quicksort arr i (!low - i))
(fun () -> quicksort arr !low (len - (!low - i)))
);;

2
dune
View file

@ -3,6 +3,6 @@
(flags :standard -strict-sequence -warn-error -a+8 -w +a-4-40-42-70)))
(mdx
(libraries moonpool threads)
(libraries moonpool moonpool.forkjoin threads)
(enabled_if
(>= %{ocaml_version} 5.0)))