This commit is contained in:
Simon Cruanes 2023-06-24 15:53:05 -04:00
parent 456a31c939
commit 2bbb4185a4
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -10,8 +10,17 @@ The rationale is that we should not have more domains than cores, so
it's easier to pre-allocate exactly that many domains, and run more flexible
thread pools on top.
In addition, `Moonpool.Fut` provides futures/promises that execute
on these thread pools. The futures are thread safe.
In addition, some concurrency and parallelism primitives are provided:
- `Moonpool.Fut` provides futures/promises that execute
on these thread pools. The futures are thread safe.
- `Moonpool.Chan` provides simple cooperative and thread-safe channels
to use within pool-bound tasks. They're essentially re-usable futures.
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
to use within tasks running in the pool.
## Usage