From 4147d29383d8245436fa4d6df5f84df9284bf8c9 Mon Sep 17 00:00:00 2001 From: Simon Cruanes Date: Thu, 1 Jun 2023 22:45:40 -0400 Subject: [PATCH] doc --- README.md | 8 ++++++++ src/pool.mli | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 1c7c2480..18572467 100644 --- a/README.md +++ b/README.md @@ -5,6 +5,14 @@ A pool within a bigger pool (ie the ocean). Here, we're talking about pools of `Thread.t` which live within a fixed pool of `Domain.t`. +This fixed pool of domains is shared between *all* the pools in moonpool. +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. + ## Usage The user can create several thread pools. These pools use regular posix threads, diff --git a/src/pool.mli b/src/pool.mli index 0d6b28df..6a04a57f 100644 --- a/src/pool.mli +++ b/src/pool.mli @@ -1,4 +1,4 @@ -(** Thread pool *) +(** Thread pool. *) type t (** A pool of threads. *)